Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers...
You are given two non-empty linked lists representing two non-negative integers...
Given head, the head of a linked list, determine if the linked list has a cycle in it.
Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
You are given the heads of two sorted linked lists list1 and list2.
Given the head of a singly linked list, return the middle node of the 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.
Given the head of a singly linked list, return true if it is a palindrome or false otherwise.
Given the head of a sorted linked list, delete all duplicates such that each element appears only once.
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.
Given the head of a linked list, remove the nth node from the end of the list and return its head.
You are given the head of a singly linked-list...
Given the head of a singly linked list, reverse the list, and return the reversed list.
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.
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
Given the head of a linked list, rotate the list to the right by k places.
Given the head of a linked list, return the list after sorting it in ascending order.
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.)