Learn basic concept of c , c++ and python programming in regularcodes.com
Sum of N middle nodes of linked list
Sum of N middle nodes of linked list. Suppose linked list contain following nodes[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].
If there are two set of a middle nodes then choose first one.
[1,2,3,4,5,6,7,8,9] and N=4.
A=[3, 4, 5]
B=[4, 5, 6]
View pointers and nodes.
Example: sum of 6 middle node is.
C program to Sum of N middle nodes of linked list. Iterative approach.