Please explain me how to approach this question

Given a linked list were supposed to update the value of each node by the sum of the node itself and the sum of (n-(k))th node
example: 31->2->3->4->5->11->50
Output : 42->13->8->4->8->13->42

1 Like

Could you provide the complete problem statement and constraints.
Also, more importantly, is the contest ongoing?

No it is just a previous year interview question of a company

As such there is no constraint specification