摘要:
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep... 阅读全文
posted @ 2014-05-30 01:20
erictanghu
阅读(99)
评论(0)
推荐(0)
摘要:
Given two words (startandend), and a dictionary, find the length of shortest transformation sequence fromstarttoend, such that:Only one letter can be ... 阅读全文
posted @ 2014-05-30 01:20
erictanghu
阅读(114)
评论(0)
推荐(0)
摘要:
Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed... 阅读全文
posted @ 2014-05-30 01:20
erictanghu
阅读(117)
评论(0)
推荐(0)
摘要:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2014-05-30 01:20
erictanghu
阅读(92)
评论(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-05-30 01:20
erictanghu
阅读(104)
评论(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-05-30 01:20
erictanghu
阅读(108)
评论(0)
推荐(0)
摘要:
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3]./**... 阅读全文
posted @ 2014-05-30 01:19
erictanghu
阅读(86)
评论(0)
推荐(0)
摘要:
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No... 阅读全文
posted @ 2014-05-30 01:19
erictanghu
阅读(72)
评论(0)
推荐(0)
摘要:
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu... 阅读全文
posted @ 2014-05-30 01:19
erictanghu
阅读(202)
评论(0)
推荐(0)
摘要:
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?/**... 阅读全文
posted @ 2014-05-30 01:19
erictanghu
阅读(86)
评论(0)
推荐(0)

浙公网安备 33010602011771号