Idiot-maker

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

随笔分类 -  LeetCode

上一页 1 2 3 4 5 6 7 8 9 10 下一页

摘要:https://leetcode.com/problems/distinct-subsequences/Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a ... 阅读全文
posted @ 2015-03-29 16:42 NickyYe 阅读(183) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/sort-list/ Sort a linked list in O(n log n) time using constant space complexity. 解题思路: 常见的O(nlogn)算法,快速排序、归并排序,堆排序。大概讲讲 阅读全文
posted @ 2015-03-28 20:39 NickyYe 阅读(257) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/permutation-sequence/ The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the 阅读全文
posted @ 2015-03-24 16:17 NickyYe 阅读(229) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/jump-game-ii/Given an array of non-negative integers, you are initially positioned at the first index of the array.Each ... 阅读全文
posted @ 2015-03-23 22:03 NickyYe 阅读(173) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/jump-game/ Given an array of non-negative integers, you are initially positioned at the first index of the array. Each e 阅读全文
posted @ 2015-03-23 20:13 NickyYe 阅读(201) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/insertion-sort-list/Sort a linked list using insertion sort.解题思路:先回忆一下插入排序。对于num[i],将他插入到前面已经排好序的0...i-1的合适的位置。i从0-n遍历。这... 阅读全文
posted @ 2015-03-23 16:51 NickyYe 阅读(196) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/factorial-trailing-zeroes/Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in l... 阅读全文
posted @ 2015-03-22 20:04 NickyYe 阅读(299) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/trapping-rain-water/Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute ... 阅读全文
posted @ 2015-03-20 21:41 NickyYe 阅读(152) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/candy/There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these child... 阅读全文
posted @ 2015-03-20 20:03 NickyYe 阅读(256) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/compare-version-numbers/Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 Integer.p... 阅读全文
posted @ 2015-03-20 13:39 NickyYe 阅读(241) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/subsets-ii/Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in ... 阅读全文
posted @ 2015-03-19 21:35 NickyYe 阅读(153) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/subsets/Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descend... 阅读全文
posted @ 2015-03-19 21:14 NickyYe 阅读(188) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/length-of-last-word/Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the leng... 阅读全文
posted @ 2015-03-19 20:42 NickyYe 阅读(259) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/longest-consecutive-sequence/ Given an unsorted array of integers, find the length of the longest consecutive elements s 阅读全文
posted @ 2015-03-19 20:20 NickyYe 阅读(160) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/sum-root-to-leaf-numbers/Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a num... 阅读全文
posted @ 2015-03-19 16:53 NickyYe 阅读(156) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/combinations/ Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example,If n 阅读全文
posted @ 2015-03-19 14:16 NickyYe 阅读(236) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/spiral-matrix-ii/Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example... 阅读全文
posted @ 2015-03-19 13:22 NickyYe 阅读(126) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/spiral-matrix/Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For examp... 阅读全文
posted @ 2015-03-19 11:03 NickyYe 阅读(153) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/substring-with-concatenation-of-all-words/ You are given a string, S, and a list of words, L, that are all of the same l 阅读全文
posted @ 2015-03-18 21:17 NickyYe 阅读(282) 评论(0) 推荐(0)

摘要:https://leetcode.com/problems/combination-sum-ii/description/ Given a collection of candidate numbers (C) and a target number (T), find all unique com 阅读全文
posted @ 2015-03-15 21:14 NickyYe 阅读(227) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 10 下一页