[LeetCode 92] Reverse Linked List II [Java]
1. Description Reverse a linked list from position m to n. Do it in-place and in one-pass. Note: Given m, n satisfy the following condition: 1 ≤ m ...
1. Description Reverse a linked list from position m to n. Do it in-place and in one-pass. Note: Given m, n satisfy the following condition: 1 ≤ m ...
1. Description A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given...
1. Description Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution ...
1. Description The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n represen...
1. Description Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. 2. E...
1. Description Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You sh...
1. Description Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and w...
1. Description Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a he...
1. Description Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Note:Bonus points if you could solve ...
1. Description Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? 2. Example Given sorted array nums = [1,1,1,2,2,...