LeetCode 21: Merge Two Sorted Lists
Problem DescriptionYou are given the heads of two sorted linked lists list1 and list2.Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two
Problem DescriptionYou are given the heads of two sorted linked lists list1 and list2.Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two
Problem DescriptionGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.A mapping of digits to l
Problem DescriptionGiven an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.Notice that the solution
Problem DescriptionYou are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).Find two lines that tog
0179 Largest NumberProblem DescriptionGiven a list of non-negative integers nums, arrange them such that they form the largest number.Note: The result may be very large, so you need to return a string
0153 & 0154 Find Minimum in Rotated Sorted ArrayProblem DescriptionSuppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7
0145 Binary Tree Postorder TraversalProblem DescriptionGiven the root of a binary tree, return the postorder traversal of its nodes' values.ExampleInput: root = [1,null,2,3] Output: [3,2,1]SolutionPle
Problem DescriptionGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.Example 1Input: s = "aab"O
Problem DescriptionGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.For example, givenpreorder = [3,9,20,15,7] ino
Problem DescriptionTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Example 1Input: [1,3,null,null,2] 1 / 3 \ 2 Output: [3,1,null