📄️ Guidelines
When it comes to linked list practice makes perfect, but there are few tricks you should remember when dealing with them:
📄️ Reverse Linked List
Given the head of a singly linked list, reverse the list, and return the reversed list.
📄️ Middle of the Linked List
Given the head of a singly linked list, return the middle node of the linked list.
📄️ Palindrome Linked List
Given the head of a singly linked list, return true if it is a palindrome or false otherwise.
📄️ Linked List Cycle
Given head, the head of a linked list, determine if the linked list has a cycle in it.
📄️ Merge Two Sorted Lists
You are given the heads of two sorted linked lists list1 and list2.
📄️ Remove Linked List Elements
Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.
📄️ Remove Duplicates from Sorted List
Given the head of a sorted linked list, delete all duplicates such that each element appears only once.
📄️ Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers...
📄️ Odd Even Linked List
Given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return the reordered list.
📄️ Remove Nth Node From End of List
Given the head of a linked list, remove the nth node from the end of the list and return its head.
📄️ Rotate List
Given the head of a linked list, rotate the list to the right by k places.
📄️ Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i.e., only nodes themselves may be changed.)
📄️ Sort List
Given the head of a linked list, return the list after sorting it in ascending order.
📄️ Reorder List
You are given the head of a singly linked-list...
📄️ Linked List Cycle II
Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.
📄️ Reverse Linked List II
Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right, and return the reversed list.
📄️ LRU Cache
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
📄️ Reverse Nodes in k-Group
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.