摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2017-10-07 20:15 Tsunami_lj 阅读(128) 评论(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 @ 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) 编辑