Ryan’s leetcode Blog
显示标签为“
lintcode
”的博文。
显示所有博文
显示标签为“
lintcode
”的博文。
显示所有博文
2015年5月19日星期二
Implement Queue by Two Stacks
›
As the title described, you should only use two stacks to implement a queue's actions. The queue should support push(element) , pop...
2015年5月17日星期日
Topological Sorting Show result
›
Given an directed graph, a topological order of the graph nodes is defined as follow: For each directed edge A-->B in graph, A must ...
2015年5月13日星期三
Minimum Adjustment Cost
›
Given an integer array, adjust each integers so that the difference of every adjcent integers are not greater than a given number target. ...
k Sum
›
Given n distinct positive integers, integer k (k <= n) and a number target. Find k numbers where sum is target. Calculate how many sol...
2015年5月12日星期二
Backpack I & II
›
Given n items with size A[i], an integer m denotes the size of a backpack. How full you can fill this backpack? Example If we have 4 ...
2015年5月6日星期三
Longest Common Substring
›
Given two strings, find the longest common substring. Return the length of it. Example Given A="ABCD" , B="CBCE...
Longest Common Subsequence
›
Given two strings, find the longest comment subsequence (LCS). Your code should return the length of LCS. Example For "ABCD...
Longest Increasing Subsequence Show result
›
Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Example F...
2015年4月26日星期日
Search Range in Binary Search Tree
›
Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Find all the keys of tree in range k1 to k2. i.e....
2015年4月22日星期三
Lowest Common Ancestor lintcode
›
Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes. The lowest common ancestor is the n...
2015年4月19日星期日
三部反转法--Recover Rotated Sorted Array
›
Given a rotated sorted array, recover it to sorted array in-place. Example [4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5] Challenge ...
2015年4月14日星期二
Search a 2D Matrix II
›
Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it. This matrix has the following pro...
First Bad Version
›
The code base version is an integer and start from 1 to n. One day, someone commit a bad version in the code case, so it caused itself and ...
2 条评论:
›
主页
查看网络版本