摘要: Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it. Example Given [1, 1, 1, 1, 阅读全文
posted @ 2016-02-26 08:02 哥布林工程师 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Given a dictionary, find all of the longest words in the dictionary. Example Given { "dog", "google", "facebook", "internationalization", "blabla" } t 阅读全文
posted @ 2016-02-26 07:41 哥布林工程师 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Give an integer array,find the longest increasing continuous subsequence in this array. An increasing continuous subsequence: Can be from right to lef 阅读全文
posted @ 2016-02-26 07:17 哥布林工程师 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2016-02-26 03:38 哥布林工程师 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. Example 1 1 / \ / \ 2 3 => 3 2 / \ 4 4 Challenge Do it in recursion is acceptable, can you do it without recursion? 1. 递归 /** * 阅读全文
posted @ 2016-02-26 03:22 哥布林工程师 阅读(155) 评论(0) 推荐(0) 编辑