All tags
Lattice Paths
Count the number of unique paths to travel from the top left corner to the bottom right corner of a lattice of M x N squares.
Find the Duplicate Number
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist.
Find Minimum in Rotated Sorted Array
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
Longest Increasing Subsequence
Given an unsorted array of integers, find the length of longest increasing subsequence.
Longest Common Subsequence
Given two strings text1 and text2, return the length of their longest common subsequence.
Combination Sum
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.
The same repeated number may be chosen from candidates unlimited number of times.
Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
Coin Change
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1.
Coin Sum
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1.