## [Leetcode] Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.

Given a binary tree, find its maximum depth.

Given a binary tree, find its minimum depth.

Add two linked lists representing two non-negative numbers.

Given a string, find the length of the longest substring without repeating characters.

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.

Calculate the total sum of all root-to-leaf numbers.

Given an array S of n integers, find there elements a, b, c in S such that a + b + c = 0.

Given an array S of n integers, find three integers in S such that the sum is closest to a given number.

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

Given a collection of numbers, return all possible permutations.

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.

Given a complete binary tree, count the number of nodes.

Given a digit string, return all possible letter combinations that the number could represent.

Reverse a linked list from position m to n. Do it in-place and in one-pass.

Given a sorted array of integers, find the starting and ending position of a given target value.

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.

Given a set of distinct integers, nums, return all possible subsets.

Given a collection of integers that might contain duplicates, nums, return all possible subsets.

Given a binary tree, check whether it is a mirror of itself.

Given a binary tree, return the inorder traversal of its nodes' values. (Both recursive and iterative solutions)

Help the robot to find all the unique paths from (0,0) to (m,n)

Help the robot to find all the unique paths from (0,0) to (m,n) with obstacles

Given a list of non negative integers, arrange them such that they form the largest number.

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used.

Given a binary tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.