What is Linked list and reverse the linked list iteratively. Given a singly linked list of integers. Your task is to return the head of the reversed linked list. For example: The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head o...
read more
CodingNinjas
author
2y
Step 1: I gave all the information about linked list like how it is stored, how we iterate it, etc.Step2 : Then i gave the iterative approach on reversing the linked list. Basically we need to take th...
see more
CodingNinjas
author
2y
Brute ForceThe brute force approach is to use recursion. First, we reach the end of the Linked List recursively and at last node, we return the last node, which becomes the new head of the partially r...
see more
CodingNinjas
author
2y
Using StackIterate through all nodes of the Linked list and push it to stack.Then update the head pointer to the top node of the stack.Then start popping each node from the stack and then assign the p...
see more
Add answer anonymously...
Top SAP Developer Associate interview questions & answers
Popular interview questions of Developer Associate
Top HR questions asked in SAP Developer Associate
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app