摘要:
Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest i 阅读全文
摘要:
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. For exam 阅读全文
摘要:
198.HouseRobber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constr 阅读全文
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
摘要:
72. Edit Distance 72. Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operat 阅读全文
摘要:
62. Unique Paths A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down 阅读全文
摘要:
面试题3 二维数组中的查找 Leetcode--74 Search a 2D Matrix 1 /*Java 2 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has th 阅读全文
摘要:
Question: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives t 阅读全文