上一页 1 2 3 4 5 6 7 8 ··· 22 下一页
摘要: QuestionWrite a program to find then-th ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For example,1, 2, 3, 4,... 阅读全文
posted @ 2015-11-09 06:13 树獭君 阅读(146) 评论(0) 推荐(0)
摘要: QuestionThere are a row ofnhouses, each house can be painted with one of thekcolors. The cost of painting each house with a certain color is different... 阅读全文
posted @ 2015-11-09 05:21 树獭君 阅读(170) 评论(0) 推荐(0)
摘要: QuestionThere are a row ofnhouses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a ... 阅读全文
posted @ 2015-11-09 03:57 树獭君 阅读(424) 评论(0) 推荐(0)
摘要: QuestionDesign an algorithm to encodea list of stringstoa string. The encoded string is then sent over the network and is decoded back to the original... 阅读全文
posted @ 2015-11-09 03:19 树獭君 阅读(476) 评论(0) 推荐(0)
摘要: Question Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. For example, Hint: Sol 阅读全文
posted @ 2015-11-08 23:52 树獭君 阅读(231) 评论(0) 推荐(0)
摘要: QuestionSuppose you are at a party withnpeople (labeled from0ton - 1) and among them, there may exist one celebrity. The definition of a celebrity is ... 阅读全文
posted @ 2015-11-08 06:00 树獭君 阅读(177) 评论(0) 推荐(0)
摘要: QuestionGiven a binary search tree and a node in it, find the in-order successor of that node in the BST.Note: If the given node has no in-order succe... 阅读全文
posted @ 2015-11-08 05:07 树獭君 阅读(252) 评论(0) 推荐(0)
摘要: First, we use recursive way.Successor 1 public class Solution { 2 public TreeNode inorderSuccessor(TreeNode root, TreeNode p) { 3 if (root... 阅读全文
posted @ 2015-11-08 05:07 树獭君 阅读(820) 评论(0) 推荐(0)
摘要: QuestionYou are given am x n2D grid initialized with these three possible values.-1- A wall or an obstacle.0- A gate.INF- Infinity means an empty room... 阅读全文
posted @ 2015-11-08 04:38 树獭君 阅读(250) 评论(0) 推荐(0)
摘要: QuestionAn image is represented by a binary matrix with0as a white pixel and1as a black pixel. The black pixels are connected, i.e., there is only one... 阅读全文
posted @ 2015-11-08 03:41 树獭君 阅读(253) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页