singly-linked

About this tag
Discussions on WindowsForum.com about reversing a singly linked list focus on algorithmic approaches, particularly using only two pointers instead of the typical three-pointer method. The content explores efficient reversal logic, time complexity, and alternative techniques for singly linked list reversal in C programming. Users share code examples and seek optimal solutions for this common data structure problem.
  1. Rishab7

    How can a singly linked list be reversed using only two pointers?

    I'm curious if there's a specific approach or logic to reverse a singly-linked list using only two pointers. Typically, the reversal involves the use of three-pointers, namely p, q, and r. struct node { int data; struct node *link; }; void reverse() { struct node *p = first...
Back
Top