随笔分类 -  LeetCode

1 2 3 4 5 ··· 9 下一页
摘要:39. Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums t 阅读全文
posted @ 2016-02-18 17:28 zengzy 阅读(427) 评论(0) 推荐(0)
摘要:217. Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears a 阅读全文
posted @ 2016-02-16 12:00 zengzy 阅读(502) 评论(0) 推荐(0)
摘要:要求: 设计并实现一个LRU缓存的数据结构,支持get和set操作 get(key):若缓存中存在key,返回对应的value,否则返回-1 set(key,value):若缓存中存在key,替换其value,否则插入key及其value,如果插入时缓存已经满了,应该使用LRU算法把最近最久没有使用 阅读全文
posted @ 2016-01-29 01:45 zengzy 阅读(9458) 评论(0) 推荐(0)
摘要:322. Coin ChangeTotal Accepted:4182Total Submissions:16210Difficulty:MediumYou are given coins of different denominations and a total amount of moneya... 阅读全文
posted @ 2016-01-05 18:49 zengzy 阅读(339) 评论(0) 推荐(1)
摘要:284. Peeking IteratorTotal Accepted:12043Total Submissions:37257Difficulty:MediumGiven an Iterator class interface with methods:next()andhasNext(), de... 阅读全文
posted @ 2016-01-05 18:10 zengzy 阅读(200) 评论(0) 推荐(1)
摘要:319. Bulb SwitcherTotal Accepted:976Total Submissions:2611Difficulty:MediumThere arenbulbs that are initially off. You first turn on all the bulbs. Th... 阅读全文
posted @ 2015-12-20 21:05 zengzy 阅读(250) 评论(0) 推荐(1)
摘要:70. Climbing StairsTotal Accepted:84498Total Submissions:237744Difficulty:EasyYou are climbing a stair case. It takesnsteps to reach to the top.Each t... 阅读全文
posted @ 2015-12-20 11:26 zengzy 阅读(219) 评论(2) 推荐(1)
摘要:198. House RobberTotal Accepted:45873Total Submissions:142855Difficulty:EasyYou are a professional robber planning to rob houses along a street. Each ... 阅读全文
posted @ 2015-12-20 11:21 zengzy 阅读(255) 评论(0) 推荐(1)
摘要:303. Range Sum Query - ImmutableTotal Accepted:10632Total Submissions:44726Difficulty:EasyGiven an integer arraynums, find the sum of the elements bet... 阅读全文
posted @ 2015-12-20 10:59 zengzy 阅读(204) 评论(0) 推荐(1)
摘要:89. Gray CodeTotal Accepted:49119Total Submissions:142633Difficulty:MediumThe gray code is a binary numeral system where two successive values differ ... 阅读全文
posted @ 2015-12-20 10:48 zengzy 阅读(200) 评论(0) 推荐(1)
摘要:22. Generate ParenthesesTotal Accepted:70039Total Submissions:203043Difficulty:MediumGivennpairs of parentheses, write a function to generate all comb... 阅读全文
posted @ 2015-12-19 21:34 zengzy 阅读(134) 评论(0) 推荐(0)
摘要:316. Remove Duplicate LettersTotal Accepted:2367Total Submissions:12388Difficulty:MediumGiven a string which contains only lowercase letters, remove d... 阅读全文
posted @ 2015-12-19 20:17 zengzy 阅读(232) 评论(0) 推荐(1)
摘要:155. Min StackTotal Accepted:54402Total Submissions:259750Difficulty:EasyDesign a stack that supports push, pop, top, and retrieving the minimum eleme... 阅读全文
posted @ 2015-12-19 16:50 zengzy 阅读(139) 评论(0) 推荐(1)
摘要:232. Implement Queue using StacksTotal Accepted:27024Total Submissions:79793Difficulty:EasyImplement the following operations of a queue using stacks.... 阅读全文
posted @ 2015-12-19 16:32 zengzy 阅读(159) 评论(0) 推荐(1)
摘要:241. Different Ways to Add ParenthesesTotal Accepted:13500Total Submissions:43882Difficulty:MediumGiven a string of numbers and operators, return all ... 阅读全文
posted @ 2015-12-19 16:07 zengzy 阅读(197) 评论(0) 推荐(0)
摘要:233. Number of Digit OneTotal Accepted:13442Total Submissions:59263Difficulty:MediumGiven an integer n, count the total number of digit 1 appearing in... 阅读全文
posted @ 2015-12-19 14:27 zengzy 阅读(141) 评论(0) 推荐(1)
摘要:Permutation SequenceTotal Accepted:44618Total Submissions:187104Difficulty:MediumThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listin... 阅读全文
posted @ 2015-12-18 23:57 zengzy 阅读(140) 评论(0) 推荐(0)
摘要:Perfect SquaresTotal Accepted:18854Total Submissions:63048Difficulty:MediumGiven a positive integern, find the least number of perfect square numbers ... 阅读全文
posted @ 2015-12-18 19:48 zengzy 阅读(200) 评论(0) 推荐(0)
摘要:Factorial Trailing ZeroesTotal Accepted:44612Total Submissions:144778Difficulty:EasyGiven an integern, return the number of trailing zeroes inn!.Note:... 阅读全文
posted @ 2015-12-18 18:38 zengzy 阅读(132) 评论(0) 推荐(1)
摘要:Excel Sheet Column TitleTotal Accepted:45878Total Submissions:230128Difficulty:EasyGiven a positive integer, return its corresponding column title as ... 阅读全文
posted @ 2015-12-18 18:06 zengzy 阅读(149) 评论(0) 推荐(0)

1 2 3 4 5 ··· 9 下一页
levels of contents