This video contains Must Do Coding Questions for Companies like Amazon, Microsoft, Adobe, …
from geeksforgeeks platform.
website link:
https://www.geeksforgeeks.org/must-do...
Detect Loop in a Linked list:
• Linked List 6: Detect Loop in a Linked lis...
Topics covered in this video series are:
1.Arrays
• 1.1 ARRAYS | Must Do Coding Questions
2.String
• 1.2 STRING | Must Do Coding Questions
3.Linked List
• 1.3 LINKED LIST | Must Do Coding Questions
4.Stack and Queue
5.Tree and BST
6.Heap
7.Recursion
8.Hashing
9.Graph
10.Greedy
11.Dynamic Programming
12.Divide and Conquer
13.Backtracking
14.Bit Magic
Linked List:
7. Remove Loop in a Linked list:
You are given a linked list of N nodes. Remove the loop from the linked list, if present.
Note: X is the position of the node to which the last node is connected to. If it is 0, then there is no loop.
Example 1:
Input:
N = 3
value[] = {1,3,4}
X = 2
Output: 1
Explanation: A loop is present. If you remove it successfully, the answer will be 1.
Example 2:
Input:
N = 4
value[] = {1,8,3,4}
X = 0
Output: 1
Explanation: The Linked list does not contains any loop.
Code Link:
https://github.com/krishna-gavas/Comp...
Intro Music :
• Video p