随笔分类 - LeetCode
摘要: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
阅读全文
摘要: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
阅读全文
摘要:要求: 设计并实现一个LRU缓存的数据结构,支持get和set操作 get(key):若缓存中存在key,返回对应的value,否则返回-1 set(key,value):若缓存中存在key,替换其value,否则插入key及其value,如果插入时缓存已经满了,应该使用LRU算法把最近最久没有使用
阅读全文
摘要:322. Coin ChangeTotal Accepted:4182Total Submissions:16210Difficulty:MediumYou are given coins of different denominations and a total amount of moneya...
阅读全文
摘要:284. Peeking IteratorTotal Accepted:12043Total Submissions:37257Difficulty:MediumGiven an Iterator class interface with methods:next()andhasNext(), de...
阅读全文
摘要:319. Bulb SwitcherTotal Accepted:976Total Submissions:2611Difficulty:MediumThere arenbulbs that are initially off. You first turn on all the bulbs. Th...
阅读全文
摘要:70. Climbing StairsTotal Accepted:84498Total Submissions:237744Difficulty:EasyYou are climbing a stair case. It takesnsteps to reach to the top.Each t...
阅读全文
摘要:198. House RobberTotal Accepted:45873Total Submissions:142855Difficulty:EasyYou are a professional robber planning to rob houses along a street. Each ...
阅读全文
摘要:303. Range Sum Query - ImmutableTotal Accepted:10632Total Submissions:44726Difficulty:EasyGiven an integer arraynums, find the sum of the elements bet...
阅读全文
摘要:89. Gray CodeTotal Accepted:49119Total Submissions:142633Difficulty:MediumThe gray code is a binary numeral system where two successive values differ ...
阅读全文
摘要:22. Generate ParenthesesTotal Accepted:70039Total Submissions:203043Difficulty:MediumGivennpairs of parentheses, write a function to generate all comb...
阅读全文
摘要:316. Remove Duplicate LettersTotal Accepted:2367Total Submissions:12388Difficulty:MediumGiven a string which contains only lowercase letters, remove d...
阅读全文
摘要:155. Min StackTotal Accepted:54402Total Submissions:259750Difficulty:EasyDesign a stack that supports push, pop, top, and retrieving the minimum eleme...
阅读全文
摘要:232. Implement Queue using StacksTotal Accepted:27024Total Submissions:79793Difficulty:EasyImplement the following operations of a queue using stacks....
阅读全文
摘要:241. Different Ways to Add ParenthesesTotal Accepted:13500Total Submissions:43882Difficulty:MediumGiven a string of numbers and operators, return all ...
阅读全文
摘要:233. Number of Digit OneTotal Accepted:13442Total Submissions:59263Difficulty:MediumGiven an integer n, count the total number of digit 1 appearing in...
阅读全文
摘要:Permutation SequenceTotal Accepted:44618Total Submissions:187104Difficulty:MediumThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listin...
阅读全文
摘要:Perfect SquaresTotal Accepted:18854Total Submissions:63048Difficulty:MediumGiven a positive integern, find the least number of perfect square numbers ...
阅读全文
摘要:Factorial Trailing ZeroesTotal Accepted:44612Total Submissions:144778Difficulty:EasyGiven an integern, return the number of trailing zeroes inn!.Note:...
阅读全文
摘要:Excel Sheet Column TitleTotal Accepted:45878Total Submissions:230128Difficulty:EasyGiven a positive integer, return its corresponding column title as ...
阅读全文
浙公网安备 33010602011771号