Practice Questions For Mid-Term (ADS-2)
Practice Questions For Mid-Term (ADS-2)
Given head, the head of a linked list, determine if the linked list
has a cycle in it.
There is a cycle in a linked list if there is some node in the list
that can be reached again by continuously following the next
pointer. Internally, pos is used to denote the index of the node Easy
that tail's next pointer is connected to. Note that pos is not
passed as a parameter.
Return true if there is a cycle in the linked list. Otherwise, return
false.
Given the head of a singly linked list, reverse the list, and
Easy
return the reversed list.
Given a linked list, swap every two adjacent nodes and
return its head. You must solve the problem without
Medium
modifying the values in the list's nodes (i.e., only nodes
themselves may be changed.)
Given a singly linked list and an integer k, the task is to
Medium
rotate the linked list to the left by k places
Insert a node at given position Easy
Given the head of a singly linked list, return true if it is a
Easy
palindrome or false otherwise.
You are given the head of a linked list. Delete the middle
node, and return the head of the modified linked list.
The middle node of a linked list of size n is the ⌊n / 2⌋th
node from the start using 0-based indexing, where ⌊x⌋ Easy
denotes the largest integer less than or equal to x.
https://leetcode.com/problems/intersection-of-two-linked-lists/description/
https://leetcode.com/problems/delete-node-in-a-linked-list/description/
https://www.geeksforgeeks.org/delete-a-linked-list-node-at-a-given-position/
https://leetcode.com/problems/linked-list-cycle/description/
https://leetcode.com/problems/reverse-linked-list/description/
https://leetcode.com/problems/swap-nodes-in-pairs/description/
https://www.geeksforgeeks.org/rotate-a-linked-list/
https://www.geeksforgeeks.org/insert-a-node-at-a-specific-position-in-a-linked
https://leetcode.com/problems/palindrome-linked-list/description/
https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/description/
Solution
https://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-of-two-linked-lists/
https://www.geeksforgeeks.org/delete-a-linked-list-node-at-a-given-position/?ref=lbp
https://www.geeksforgeeks.org/detect-loop-in-a-linked-list/
https://www.geeksforgeeks.org/reverse-a-linked-list/
https://www.geeksforgeeks.org/pairwise-swap-adjacent-nodes-of-a-linked-list-by-changing-pointers-set-2/
https://www.geeksforgeeks.org/rotate-a-linked-list/
https://www.geeksforgeeks.org/insert-a-node-at-a-specific-position-in-a-linked-list/
https://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/
https://www.geeksforgeeks.org/delete-middle-of-linked-list/
https://drive.google.com/file/d/1eqAcc9xaq8qAqaSd-PYAVz8vKtAI3IgI/view?usp=drive_link