12 2014 档案

摘要:自己在虚拟机上建立伪分布环境,第一天还一切正常,后来发现每次重新开机以后都不能正常启动,在start-dfs.sh之后jps一下发现namenode不能正常启动,按提示找到logs目录下namenode的启动log发现如下异常。hadoop@cgy-VirtualBox:~$ jps5096 Re... 阅读全文
posted @ 2014-12-31 00:37 birdhack 阅读(5863) 评论(0) 推荐(0)
摘要:Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.Credits:Special thanks to@tsf... 阅读全文
posted @ 2014-12-30 21:14 birdhack 阅读(115) 评论(0) 推荐(0)
摘要:Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ... 阅读全文
posted @ 2014-12-29 22:11 birdhack 阅读(157) 评论(0) 推荐(0)
摘要:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity. 1 /** 2 * Definition for singly-linked list. 3 * pu... 阅读全文
posted @ 2014-12-26 23:16 birdhack 阅读(113) 评论(0) 推荐(0)
摘要:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The... 阅读全文
posted @ 2014-12-25 22:02 birdhack 阅读(137) 评论(0) 推荐(0)
摘要:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ... 阅读全文
posted @ 2014-12-23 22:58 birdhack 阅读(129) 评论(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 @ 2014-12-22 22:13 birdhack 阅读(170) 评论(0) 推荐(0)
摘要:Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 ->... 阅读全文
posted @ 2014-12-22 21:03 birdhack 阅读(123) 评论(0) 推荐(0)
摘要:Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that the arr... 阅读全文
posted @ 2014-12-22 20:44 birdhack 阅读(228) 评论(1) 推荐(0)
摘要:Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o... 阅读全文
posted @ 2014-12-20 00:39 birdhack 阅读(131) 评论(0) 推荐(0)
摘要:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ... 阅读全文
posted @ 2014-12-18 23:56 birdhack 阅读(123) 评论(0) 推荐(0)
摘要:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2014-12-17 23:15 birdhack 阅读(121) 评论(0) 推荐(0)
摘要:Compare two version numbersversion1andversion1.Ifversion1>version2return 1, ifversion11) {11 versionsOne[i]=versionsOne[i].substring(1... 阅读全文
posted @ 2014-12-16 21:55 birdhack 阅读(171) 评论(0) 推荐(0)
摘要:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =... 阅读全文
posted @ 2014-12-15 23:40 birdhack 阅读(135) 评论(0) 推荐(0)
摘要:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文
posted @ 2014-12-14 00:12 birdhack 阅读(148) 评论(0) 推荐(0)
摘要:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil... 阅读全文
posted @ 2014-12-12 00:09 birdhack 阅读(158) 评论(0) 推荐(0)
摘要:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2014-12-10 23:34 birdhack 阅读(145) 评论(0) 推荐(0)
摘要:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ... 阅读全文
posted @ 2014-12-09 22:25 birdhack 阅读(99) 评论(0) 推荐(0)
摘要:A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index.... 阅读全文
posted @ 2014-12-06 13:19 birdhack 阅读(196) 评论(0) 推荐(0)