码迷,mamicode.com
首页 >  
搜索关键字:刷题    ( 2326个结果
【leetcode刷题笔记】Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题解:开始想到的方法比较偷懒,直接遍历一遍数组,把每个ListNode对应的值放到...
分类:其他好文   时间:2014-07-22 22:45:13    阅读次数:271
【leetcode刷题笔记】Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2014-07-22 22:43:14    阅读次数:198
【leetcode刷题笔记】Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:其他好文   时间:2014-07-22 00:35:34    阅读次数:238
【leetcode刷题笔记】Valid Sudoku
Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ...
分类:其他好文   时间:2014-07-22 00:30:38    阅读次数:212
【leetcode刷题笔记】Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:其他好文   时间:2014-07-22 00:28:36    阅读次数:169
【leetcode刷题笔记】Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-07-22 00:12:36    阅读次数:156
【leetcode刷题笔记】Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-07-22 00:09:37    阅读次数:151
【leetcode刷题笔记】Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.题解:以strs[0]为模板,每次挨个查看是否所有的串里面是否第i位上都和strs[0]一样,如果都一样,把i位置上的字符放到a...
分类:其他好文   时间:2014-07-21 23:31:00    阅读次数:267
【leetcode刷题笔记】Subsets
Given 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 not co...
分类:其他好文   时间:2014-07-21 14:11:16    阅读次数:151
【leetcode刷题笔记】String to Integer (atoi)
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:其他好文   时间:2014-07-21 08:36:32    阅读次数:208
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!