India’s Best Job Seekers and Training Platform Forums Data Structure Implement a program to reverse the linear linked list …

  • Implement a program to reverse the linear linked list …

     Akash  updated 11 months, 2 weeks ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    Implement a program to reverse the linear linked list in pairs. it should handle both even number of nodes and odd number of nodes. if odd number of nodes, the last node will be the last node after reversion.
    Do not move the data in the nodes. Do manipulate node pointers/references. the nodes themselves need to be manipulated, not just the data in the nodes.
    For example, if the initial linear linked is,
    1->2->3->4->5
    after reverse it should be,
    2->1->4->3->5

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 19th October 2020. Attend one week free demo classes.Register Now

New Report

Close