Skip to content

Commit

Permalink
Update repo
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhanshurav authored Jan 3, 2023
1 parent 546b7bb commit 705d7b1
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,3 @@ class Solution {
}
};

//<----------> GFG Question Solution <------->


class Solution
{
public:
//Function to reverse a linked list.
struct Node* reverseList(struct Node *head)
{
Node* curr = head;
Node* prev = NULL;
Node* move = NULL;

while(curr!=NULL){

move = curr -> next;
curr->next = prev;
prev = curr;
curr = move;

}
return prev;
}

};

0 comments on commit 705d7b1

Please sign in to comment.