k
to store the resulting parts.N
in the list.width = N / k
and the remainder remainder = N % k
.partSize
by adding 1 to width
if the part index is less than remainder
.partSize
nodes, keeping track of the current and previous nodes.partSize
nodes, sever the link from the previous node to the current node to form a part.k
parts.