bailuo

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2014年10月22日

摘要: Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed... 阅读全文
posted @ 2014-10-22 22:09 bailuo 阅读(159) 评论(0) 推荐(0)

摘要: Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文
posted @ 2014-10-22 11:04 bailuo 阅读(189) 评论(0) 推荐(0)

2014年10月21日

摘要: Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni... 阅读全文
posted @ 2014-10-21 21:33 bailuo 阅读(215) 评论(0) 推荐(0)

摘要: Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
posted @ 2014-10-21 10:45 bailuo 阅读(132) 评论(0) 推荐(0)

2014年10月18日

摘要: 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 @ 2014-10-18 20:42 bailuo 阅读(105) 评论(0) 推荐(0)

2014年10月17日

摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pa... 阅读全文
posted @ 2014-10-17 15:48 bailuo 阅读(125) 评论(0) 推荐(0)

2014年10月16日

摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask... 阅读全文
posted @ 2014-10-16 20:12 bailuo 阅读(115) 评论(0) 推荐(0)