上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页

1 sec on Large Judge (java): https://github.com/l...

摘要: 1 sec on Large Judge (java): https://github.com/leoyonn/leetcode/blob/master/src/q029_substring_of_all_words/Solution.java 阅读全文
posted @ 2013-03-31 18:45 小刀初试 阅读(90) 评论(0) 推荐(0)

[LeetCode] Path Sum, Solution

摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo... 阅读全文
posted @ 2013-03-24 02:44 小刀初试 阅读(100) 评论(0) 推荐(0)

嗯哪

摘要: 嗯哪 阅读全文
posted @ 2013-03-24 02:27 小刀初试 阅读(89) 评论(0) 推荐(0)

[Interview] Serialize and De-serialize a tree

摘要: A very frequent interview question. Suppose you have a tree, how could you serialize it to file and revert it back?for example, ... 阅读全文
posted @ 2013-03-23 08:43 小刀初试 阅读(144) 评论(0) 推荐(0)

[LeetCode] Convert Sorted Array to Binary Search Tree, Solution

摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.» Solve this problem[Thoughts][Code]1: TreeNode... 阅读全文
posted @ 2013-03-23 08:40 小刀初试 阅读(103) 评论(0) 推荐(0)

[LeetCode] Same Tree, Solution

摘要: Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an... 阅读全文
posted @ 2013-03-22 13:33 小刀初试 阅读(91) 评论(0) 推荐(0)

设计题

摘要: 设计一个系统,每次用户访问,生成一个唯一的ID,支持千万用户同时访问。 阅读全文
posted @ 2013-03-22 02:13 小刀初试 阅读(99) 评论(0) 推荐(0)

海量数据处理总结

摘要: 前言 一般而言,标题含有“秒杀”,“99%”,“史上最全/最强”等词汇的往往都脱不了哗众取宠之嫌,但进一步来讲,如果读者读罢此文,却无任何收获,那么,我也甘愿背负这样的罪名,:-),同时,此文可以看做是对这篇文章:十道海量数据处理面试题与十个方法大总结的一般抽象性总结。 毕竟受文章和理论之... 阅读全文
posted @ 2013-03-22 02:12 小刀初试 阅读(149) 评论(0) 推荐(0)

图搜索

摘要: 1. 介绍本文介绍了比较初级的图搜索算法,包括深度优先遍历,广度优先遍历和双向广度优先遍历。2. 深度优先遍历DFS2.1 算法思想从图中某个顶点v开始,访问此节点,然后依次从v中未被访问的邻接点出发深度优先遍历图,直到图中上所有和v有路径相通的顶点都被访问;若此时图中尚有顶点未被访问,则另选图中一... 阅读全文
posted @ 2013-03-22 02:12 小刀初试 阅读(388) 评论(0) 推荐(0)

[LeetCode] Unique Binary Search Trees II, Solution

摘要: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all ... 阅读全文
posted @ 2013-03-21 11:34 小刀初试 阅读(105) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页