摘要: 题目: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-06-25 21:23 平凡的幸福... 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].N... 阅读全文
posted @ 2014-06-25 21:02 平凡的幸福... 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 本文部分来源于CSDN兰亭风雨大牛的原创。链接为http://blog.csdn.net/ns_code/article/details/12977901因为感觉大牛讲的很好,所以这里的文字讲解采用大牛的,大家可以直接看原创!代码部分是我自己的,leetcode代码,可在leetcode Accep... 阅读全文
posted @ 2014-06-24 22:45 平凡的幸福... 阅读(4538) 评论(0) 推荐(1) 编辑
摘要: 题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.说明:有序链... 阅读全文
posted @ 2014-06-22 10:22 平凡的幸福... 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, r... 阅读全文
posted @ 2014-06-22 09:42 平凡的幸福... 阅读(622) 评论(0) 推荐(0) 编辑
摘要: leetcode:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last... 阅读全文
posted @ 2014-06-21 22:34 平凡的幸福... 阅读(233) 评论(0) 推荐(0) 编辑