2015年6月26日
摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
阅读全文
posted @ 2015-06-26 00:12
gone~with~wind
阅读(181)
推荐(0)
2015年6月20日
摘要:
设计模式(Design Patterns) ——可复用面向对象软件的基础另一个讲得很好的网页:http://www.cnblogs.com/jingmoxukong/p/4221087.html设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结...
阅读全文
posted @ 2015-06-20 20:19
gone~with~wind
阅读(144)
推荐(0)
2015年6月17日
摘要:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
阅读全文
posted @ 2015-06-17 23:14
gone~with~wind
阅读(438)
推荐(0)
摘要:
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 @ 2015-06-17 22:40
gone~with~wind
阅读(138)
推荐(0)
2015年6月15日
摘要:
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
阅读全文
posted @ 2015-06-15 23:55
gone~with~wind
阅读(95)
推荐(0)
2015年6月14日
摘要:
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 @ 2015-06-14 23:14
gone~with~wind
阅读(97)
推荐(0)
摘要:
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
阅读全文
posted @ 2015-06-14 23:06
gone~with~wind
阅读(121)
推荐(0)
摘要:
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
阅读全文
posted @ 2015-06-14 21:43
gone~with~wind
阅读(143)
推荐(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 @ 2015-06-14 15:56
gone~with~wind
阅读(138)
推荐(0)
摘要:
Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.构建字典树class TrieNode {...
阅读全文
posted @ 2015-06-14 13:38
gone~with~wind
阅读(200)
推荐(0)