上一页 1 2 3 4 5 6 ··· 15 下一页
摘要: 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 @ 2017-10-07 13:29 Tsunami_lj 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2017-10-07 12:15 Tsunami_lj 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 参考链接: http://dongxicheng.org/structure/lca-rmq/ http://blog.csdn.net/y990041769/article/details/40887469 http://www.cnblogs.com/JVxie/p/4854719.html h 阅读全文
posted @ 2017-10-07 10:57 Tsunami_lj 阅读(279) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2017-10-07 09:50 Tsunami_lj 阅读(135) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have t 阅读全文
posted @ 2017-10-06 20:00 Tsunami_lj 阅读(117) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have t 阅读全文
posted @ 2017-10-06 19:58 Tsunami_lj 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-06 17:41 Tsunami_lj 阅读(118) 评论(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 @ 2017-10-06 15:40 Tsunami_lj 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2017-10-06 15:01 Tsunami_lj 阅读(131) 评论(0) 推荐(0) 编辑
摘要: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文
posted @ 2017-10-06 14:38 Tsunami_lj 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 15 下一页