上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 40 下一页
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is1 -> 2 -> 3 -> ... 阅读全文
posted @ 2015-08-29 05:55 amazingzoe 阅读(106) 评论(0) 推荐(0)
摘要: Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ... 阅读全文
posted @ 2015-08-27 08:15 amazingzoe 阅读(120) 评论(0) 推荐(0)
摘要: Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->... 阅读全文
posted @ 2015-08-25 13:50 amazingzoe 阅读(165) 评论(0) 推荐(0)
摘要: Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner cas... 阅读全文
posted @ 2015-08-25 06:29 amazingzoe 阅读(148) 评论(0) 推荐(0)
摘要: Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl... 阅读全文
posted @ 2015-08-25 05:41 amazingzoe 阅读(127) 评论(0) 推荐(0)
摘要: Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl... 阅读全文
posted @ 2015-08-23 22:39 amazingzoe 阅读(121) 评论(0) 推荐(0)
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.Analyse: For each row, we can det... 阅读全文
posted @ 2015-08-23 00:57 amazingzoe 阅读(119) 评论(0) 推荐(0)
摘要: Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo... 阅读全文
posted @ 2015-08-22 13:40 amazingzoe 阅读(124) 评论(0) 推荐(0)
摘要: 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-08-22 06:37 amazingzoe 阅读(153) 评论(0) 推荐(0)
摘要: Write 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, 5, 6, 8... 阅读全文
posted @ 2015-08-22 05:48 amazingzoe 阅读(250) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 40 下一页