上一页 1 ··· 4 5 6 7 8
摘要: First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Yo... 阅读全文
posted @ 2015-01-03 16:35 H5开发技术 阅读(146) 评论(0) 推荐(0)
摘要: Edit DistanceGiven two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You... 阅读全文
posted @ 2015-01-03 16:06 H5开发技术 阅读(225) 评论(0) 推荐(0)
摘要: Container With Most WaterGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such t... 阅读全文
posted @ 2015-01-03 15:05 H5开发技术 阅读(162) 评论(0) 推荐(0)
摘要: Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return... 阅读全文
posted @ 2015-01-03 12:19 H5开发技术 阅读(179) 评论(0) 推荐(0)
摘要: Path Sum IIGiven 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 tr... 阅读全文
posted @ 2015-01-03 11:37 H5开发技术 阅读(172) 评论(0) 推荐(0)
摘要: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be... 阅读全文
posted @ 2015-01-03 11:20 H5开发技术 阅读(149) 评论(0) 推荐(0)
摘要: Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"255255... 阅读全文
posted @ 2015-01-03 10:52 H5开发技术 阅读(202) 评论(0) 推荐(0)
摘要: Binary Search Tree IteratorImplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callin... 阅读全文
posted @ 2015-01-01 16:40 H5开发技术 阅读(214) 评论(0) 推荐(0)
摘要: Palindrome Partitioning IIGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a p... 阅读全文
posted @ 2015-01-01 15:17 H5开发技术 阅读(158) 评论(0) 推荐(0)
摘要: Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the... 阅读全文
posted @ 2014-12-30 21:53 H5开发技术 阅读(183) 评论(0) 推荐(0)
摘要: Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ... 阅读全文
posted @ 2014-12-30 20:52 H5开发技术 阅读(214) 评论(0) 推荐(0)
摘要: Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4... 阅读全文
posted @ 2014-12-30 20:26 H5开发技术 阅读(211) 评论(0) 推荐(0)
摘要: Factorial Trailing ZeroesGiven an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.统计末尾... 阅读全文
posted @ 2014-12-30 16:52 H5开发技术 阅读(506) 评论(2) 推荐(0)
摘要: Simplify PathGiven an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to sh... 阅读全文
posted @ 2014-12-29 21:24 H5开发技术 阅读(252) 评论(0) 推荐(0)
摘要: Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a sol... 阅读全文
posted @ 2014-12-29 21:23 H5开发技术 阅读(153) 评论(0) 推荐(0)
摘要: Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sum... 阅读全文
posted @ 2014-12-29 21:22 H5开发技术 阅读(203) 评论(0) 推荐(0)
摘要: Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thes... 阅读全文
posted @ 2014-12-29 21:20 H5开发技术 阅读(170) 评论(0) 推荐(0)
摘要: Subsets IIGiven a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descend... 阅读全文
posted @ 2014-12-29 21:19 H5开发技术 阅读(188) 评论(0) 推荐(0)
摘要: SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must... 阅读全文
posted @ 2014-12-29 21:18 H5开发技术 阅读(165) 评论(0) 推荐(0)
摘要: Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ... 阅读全文
posted @ 2014-12-29 21:17 H5开发技术 阅读(204) 评论(0) 推荐(0)
摘要: Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there... 阅读全文
posted @ 2014-12-28 22:45 H5开发技术 阅读(203) 评论(0) 推荐(0)
摘要: 4SumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum... 阅读全文
posted @ 2014-12-28 20:03 H5开发技术 阅读(187) 评论(0) 推荐(0)
摘要: 3SumGiven 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:El... 阅读全文
posted @ 2014-12-28 19:36 H5开发技术 阅读(170) 评论(0) 推荐(0)
摘要: Excel Sheet Column NumberRelated to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column ... 阅读全文
posted @ 2014-12-28 19:01 H5开发技术 阅读(263) 评论(0) 推荐(0)
摘要: Palindrome PartitioningGiven a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioni... 阅读全文
posted @ 2014-12-27 22:53 H5开发技术 阅读(168) 评论(0) 推荐(0)
摘要: Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.最简单的思路,逐... 阅读全文
posted @ 2014-12-27 21:38 H5开发技术 阅读(209) 评论(0) 推荐(0)
摘要: Sudoku SolverWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that the... 阅读全文
posted @ 2014-12-26 21:59 H5开发技术 阅读(165) 评论(0) 推荐(0)
摘要: Interleaving StringGivens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", r... 阅读全文
posted @ 2014-12-25 22:54 H5开发技术 阅读(158) 评论(0) 推荐(0)
摘要: Canvas1.所有的UI元件都需要放在Canvas里2.UI元件的绘制顺序,与在 Hierarchy的顺序相同,在上面的元素会先被绘制,位于后续绘制元素的下面3.可以选择3种不同的渲染模式:Screen Space - Overlay类似于深度摄像机,会将UI渲染到游戏场景的最前面Screen S... 阅读全文
posted @ 2014-12-25 19:18 H5开发技术 阅读(479) 评论(0) 推荐(0)
摘要: Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.罗马数字有如下符号:基本字符IVXLCDM阿拉伯数字15... 阅读全文
posted @ 2014-12-24 22:36 H5开发技术 阅读(179) 评论(0) 推荐(0)
摘要: Valid SudokuDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are ... 阅读全文
posted @ 2014-12-24 22:06 H5开发技术 阅读(209) 评论(0) 推荐(0)
摘要: Sort ListSort a linked list inO(nlogn) time using constant space complexity.需要采用归并排序对链表进行操作。归并排序思想:每次选取链表中间元素,把链表分割成两部分,递归分割,直到链表中的元素是有序的时候(即只有一个元素时候)... 阅读全文
posted @ 2014-12-24 21:24 H5开发技术 阅读(175) 评论(0) 推荐(0)
摘要: Majority ElementGiven an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may ass... 阅读全文
posted @ 2014-12-24 18:44 H5开发技术 阅读(250) 评论(0) 推荐(0)
摘要: String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, plea... 阅读全文
posted @ 2014-12-21 22:23 H5开发技术 阅读(189) 评论(0) 推荐(0)
摘要: Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that i... 阅读全文
posted @ 2014-12-21 21:05 H5开发技术 阅读(173) 评论(0) 推荐(0)
摘要: Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr... 阅读全文
posted @ 2014-12-21 20:49 H5开发技术 阅读(258) 评论(0) 推荐(0)
摘要: Search in Rotated Sorted Array IIFollow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity... 阅读全文
posted @ 2014-12-20 23:03 H5开发技术 阅读(152) 评论(0) 推荐(0)
摘要: Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).... 阅读全文
posted @ 2014-12-20 22:57 H5开发技术 阅读(183) 评论(0) 推荐(0)
摘要: Excel Sheet Column TitleGiven a non-zero positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A ... 阅读全文
posted @ 2014-12-20 19:17 H5开发技术 阅读(231) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8