摘要: Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
posted @ 2015-08-02 23:06 amazingzoe 阅读(155) 评论(0) 推荐(0)
摘要: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired bythis... 阅读全文
posted @ 2015-08-02 22:55 amazingzoe 阅读(146) 评论(0) 推荐(0)
摘要: Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car", retur... 阅读全文
posted @ 2015-08-02 21:58 amazingzoe 阅读(113) 评论(0) 推荐(0)
摘要: 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 @ 2015-08-02 21:35 amazingzoe 阅读(114) 评论(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 @ 2015-08-02 21:27 amazingzoe 阅读(127) 评论(0) 推荐(0)