List of solved problems
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at depth 1.
Add the two numbers and return it as a linked list.
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.
Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.
Given two arrays A and B of equal size, the advantage of A with respect to B is the number of indices i for which A[i] > B[i].
Given two strings s and t , write a function to determine if t is an anagram of s.
Given two strings, a and b, that may or may not be of the same length, determine the minimum number of character deletions required to make a and b anagrams.
Given an array A of integers, and an array queries of queries return the answer to all queries.
You need to find minimum cost to reach the top of the floor, and you can either start from the step with index 0, or the step with index 1.
Given a string representing the file system in the above format, return the length of the longest absolute path to file in the abstracted file system. If there is no file in the system, return 0.
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
Find two lines, which together with x-axis forms a container, such that the container contains the most water.
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.
Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the max sliding window.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once.
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
Given an undirected graph, return true if and only if it is bipartite.