-
Given a pattern and a string str, find if str follows the same pattern.
Here follow means a full match, such that there is a...
-
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your pr...
-
Sort a linked list in O(n log n) time using constant space complexity.
12345678910111213141516171819202122232425262728293031...
-
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
You have a car with an unlim...
-
Given a collection of distinct numbers, return all possible permutations.
For example,[1,2,3] have the following permutations...
-
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the ar...
-
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the ar...
-
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the s...
-
Given a linked list, remove the nth node from the end of list and return its head.
For example,
1234Given linked list: 1->...
-
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters ...