文章
284. Peeking Iterator
GivenanIteratorclassinterfacewithmethods:next()andhasNext(),designandimplementaPeekingIteratorthatsupportthepeek()operationite
LeetCode 322. Coin Change
DescriptionYouaregivencoinsofdifferentdenominationsandatotalamountofmoneyamount.Writeafunctiontocomputethefewestnumberofc
【Leetcode】104. 二叉树的最大深度
题目给定一个二叉树,找出其最大深度。二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。说明:叶子节点是指没有子节点的节点。示例:给定二叉树3,9,20,null,null,15,7,<pre<code3/\920/
204. Count Primes
Countthenumberofprimenumberslessthananonnegativenumber,n.Example:<pre<codeInput:10Output:4Explanation:Thereare4primenumber
275. H-Index II
Givenanarrayofcitationssortedinascendingorder(eachcitationisanonnegativeinteger)ofaresearcher,writeafunctiontocomputetheresea
274. H-Index
Givenanarrayofcitations(eachcitationisanonnegativeinteger)ofaresearcher,writeafunctiontocomputetheresearcher&39;shindex.Acco
LeetCode刷题——29. Divide Two Integers(Part 1靠自己)
当我第一次看到这个题目时候我我心想不就是两数相除嘛,这么简单的题目为什么要放到Medium中,事实证明我当时的想法Tooyoung,Toosimple,Toonaive以至于被打脸n次,可以直接查看最后答案,中间我的思路自白可以忽略。!clipboard.png(/img/bVb
264. Ugly Number II
Writeaprogramtofindthenthuglynumber.Uglynumbersarepositivenumberswhoseprimefactorsonlyinclude2,3,5.Example:<pre<codeInp
241. Different Ways to Add Parentheses
Givenastringofnumbersandoperators,returnallpossibleresultsfromcomputingallthedifferentpossiblewaystogroupnumbersandoperators.Th
240. Search a 2D Matrix II
Writeanefficientalgorithmthatsearchesforavalueinanmxnmatrix.Thismatrixhasthefollowingproperties:Integersineachrowaresortedin
已加载文章中没有匹配内容,试试其他关键词或清空搜索。