上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 53 下一页
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-08-09 03:59 北叶青藤 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Union-Find Algrithm is used to check whether two components are connected or not. Examples: By using the graph, we can easily find whether two compone 阅读全文
posted @ 2016-08-09 02:25 北叶青藤 阅读(614) 评论(0) 推荐(0) 编辑
摘要: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John 阅读全文
posted @ 2016-08-08 22:13 北叶青藤 阅读(393) 评论(0) 推荐(0) 编辑
摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2016-08-08 11:39 北叶青藤 阅读(321) 评论(0) 推荐(0) 编辑
摘要: The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actual number of characters read. For example, it retu 阅读全文
posted @ 2016-08-08 10:11 北叶青藤 阅读(264) 评论(0) 推荐(0) 编辑
摘要: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca 阅读全文
posted @ 2016-08-08 02:47 北叶青藤 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. For example:Given n = 13,Return 阅读全文
posted @ 2016-08-07 11:48 北叶青藤 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2016-08-07 05:21 北叶青藤 阅读(279) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. 1 public class Solution { 2 3 public TreeNode inorde 阅读全文
posted @ 2016-08-07 00:05 北叶青藤 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Range Sum Query 2D - Mutable Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) 阅读全文
posted @ 2016-08-06 23:13 北叶青藤 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 53 下一页