摘要: Binary Tree Postorder Traversal My Submissions QuestionEditorial Solution Total Accepted: 97358 Total Submissions: 273744 Difficulty: Hard Given a bin 阅读全文
posted @ 2016-05-11 16:33 Free_Open 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Gray Code My Submissions QuestionEditorial Solution Total Accepted: 60277 Total Submissions: 165212 Difficulty: Medium The gray code is a b... 阅读全文
posted @ 2016-05-11 12:12 Free_Open 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Reorder List My Submissions QuestionEditorial Solution Total Accepted: 64392 Total Submissions: 281830 Difficulty: Medium Given a singly li... 阅读全文
posted @ 2016-05-10 22:35 Free_Open 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Zigzag Level Order Traversal My Submissions QuestionEditorial Solution Total Accepted: 60410 Total Submissions: 210160 Difficul... 阅读全文
posted @ 2016-05-10 21:13 Free_Open 阅读(228) 评论(0) 推荐(0) 编辑
摘要: IP聚合 Accepts: 138  Submissions: 293  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others) Problem Descriptio... 阅读全文
posted @ 2016-05-09 21:06 Free_Open 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 这是自己用stl实现的一些字符串处理函数和常用的字符串处理技巧,经验正基本无误,可直接使用,若有问题,可相应列出 包括:split string to int int to string join#include #in... 阅读全文
posted @ 2016-05-09 15:26 Free_Open 阅读(6079) 评论(0) 推荐(0) 编辑
摘要: 96. Unique Binary Search Trees My Submissions Question Editorial Solution Total Accepted: 82788 Total Submissions: 220611 Difficulty: ... 阅读全文
posted @ 2016-05-09 12:10 Free_Open 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 问题:给定一个有序序列1~n,要你将其完全打乱,要求每个元素在任何一个位置出现的概率均为1/n。 解决方案:依次遍历数组,对第n个元素,以1/n的概率与前n个元素中的某个元素互换位置,最后生成的序列即满足要求,1/n的概率可通过rand() % n实现。见如下程序: void swap(int*... 阅读全文
posted @ 2016-05-08 18:31 Free_Open 阅读(334) 评论(0) 推荐(1) 编辑
摘要: Binary Tree Level Order Traversal II My Submissions QuestionEditorial Solution Total Accepted: 79742 Total Submissions: 234887 Difficulty: ... 阅读全文
posted @ 2016-05-08 18:25 Free_Open 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Level Order Traversal My Submissions QuestionEditorial Solution Total Accepted: 102531 Total Submissions: 312211 Difficulty: Easy Given a 阅读全文
posted @ 2016-05-08 16:16 Free_Open 阅读(218) 评论(0) 推荐(0) 编辑