E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
lettcode
Lettcode
_228_Summary Ranges
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/46762039Givenasortedintegerarraywithoutduplicates,returnthesummaryofitsranges.Forexample,given [0,1,2,4,5,7],return ["0->2","4->5",
pistolove
·
2015-07-05 11:00
java
LeetCode
编程
算法
Lettcode
_205_Isomorphic Strings
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/46530865Giventwostrings s and t,determineiftheyareisomorphic.Twostringsareisomorphicifthecharactersin s canbereplacedtoget t.Allocc
pistolove
·
2015-06-17 10:00
java
LeetCode
算法
String
Lettcode
_204_Count Primes
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/46366207Description:Countthenumberofprimenumberslessthananon-negativenumber, n.思路:(1)题意为给定整数n,求解n以内的整数中有多少个素数(质数)。(2)该题涉及到数学相关的知识。首
pistolove
·
2015-06-04 19:00
java
LeetCode
算法
素数
Lettcode
_217_Contains Duplicate
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/46271159Givenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueappearsatleasttwiceinthear
pistolove
·
2015-05-30 09:00
java
LeetCode
算法
HashMap
Lettcode
_203_Remove Linked List Elements
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/45868027Removeallelementsfromalinkedlistofintegersthathavevalue val.ExampleGiven: 1-->2-->6-->3-->4-->5-->6, val =6Return: 1-->2-->
pistolove
·
2015-05-20 10:00
java
LeetCode
算法
链表
Lettcode
_206_Reverse Linked List
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/45739753 Reverseasinglylinkedlist.clicktoshowmorehints.Hint:Alinkedlistcanbereversedeitheriterativelyorrecursively.Couldyouimplem
pistolove
·
2015-05-15 08:00
java
LeetCode
算法
链表
Lettcode
_202_Happy Number
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/45396585Writeanalgorithmtodetermineifanumberis"happy".Ahappynumberisanumberdefinedbythefollowingprocess:Startingwithanypositiveinte
pistolove
·
2015-04-30 16:00
java
LeetCode
算法
递归
Lettcode
_34_Search for a Range
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/44021767Givenasortedarrayofintegers,findthestartingandendingpositionofagiventargetvalue.Youralgorithm'sruntimecomplexitymustbeinthe
pistolove
·
2015-03-02 18:00
java
LeetCode
算法
二分查找
数组
Lettcode
_53_Maximum Subarray
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43989997Findthecontiguoussubarraywithinanarray(containingatleastonenumber)whichhasthelargestsum.Forexample,giventhearray [−2,1,−3,4
pistolove
·
2015-02-28 21:00
java
LeetCode
算法
数组
Lettcode
_128_Longest Consecutive Sequence
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43854597Givenanunsortedarrayofintegers,findthelengthofthelongestconsecutiveelementssequence.Forexample,Given [100,4,200,1,3,2],Thel
pistolove
·
2015-02-16 20:00
java
LeetCode
算法
数组
Lettcode
_80_Remove Duplicates from Sorted Array II
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43835055Followupfor"RemoveDuplicates":Whatifduplicatesareallowedatmost twice?Forexample,GivensortedarrayA= [1,1,1,2,2,3],Yourfuncti
pistolove
·
2015-02-15 14:00
java
LeetCode
算法
数组
Lettcode
_123_Best Time to Buy and Sell Stock III
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43740415Sayyouhaveanarrayforwhichthe ith elementisthepriceofagivenstockonday i.Designanalgorithmtofindthemaximumprofit.Youmaycomple
pistolove
·
2015-02-11 21:00
java
LeetCode
算法
遍历
Lettcode
_35_Search Insert Position
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43739647Givenasortedarrayandatargetvalue,returntheindexifthetargetisfound.Ifnot,returntheindexwhereitwouldbeifitwereinsertedinorder
pistolove
·
2015-02-11 20:00
java
LeetCode
二分查找
算法
Lettcode
_116_Populating Next Right Pointers in Each Node
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43532817GivenabinarytreestructTreeLinkNode{ TreeLinkNode*left; TreeLinkNode*right; TreeLinkNode*next; } Populateeachnextpointertopo
pistolove
·
2015-02-05 19:00
java
LeetCode
算法
二叉树
Lettcode
_154_Find Minimum in Rotated Sorted Array
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43416613Supposeasortedarrayisrotatedatsomepivotunknowntoyoubeforehand.(i.e., 0124567 mightbecome 4567012).Findtheminimumelement.You
pistolove
·
2015-02-02 21:00
java
LeetCode
算法
数组
Lettcode
_162_Find Peak Element
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43415313Apeakelementisanelementthatisgreaterthanitsneighbors.Givenaninputarraywhere num[i]≠num[i+1],findapeakelementandreturnitsind
pistolove
·
2015-02-02 21:00
java
LeetCode
算法
数组
Lettcode
_62_Unique Paths
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43404205Arobotislocatedatthetop-leftcornerofa m x n grid(marked'Start'inthediagrambelow).Therobotcanonlymoveeitherdownorrightatanyp
pistolove
·
2015-02-02 08:00
java
LeetCode
算法
Lettcode
_24_Swap Nodes in Pairs
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43302355Givenalinkedlist,swapeverytwoadjacentnodesandreturnitshead.Forexample,Given 1->2->3->4,youshouldreturnthelistas 2->1->4->3.
pistolove
·
2015-01-30 07:00
java
LeetCode
算法
链表
Lettcode
_75_Sort Colors
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43302343Givenanarraywith n objectscoloredred,whiteorblue,sortthemsothatobjectsofthesamecolorareadjacent,withthecolorsintheorderred,
pistolove
·
2015-01-30 07:00
java
LeetCode
排序
算法
Lettcode
_96_Unique Binary Search Trees
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43198929Given n,howmanystructurallyunique BST's (binarysearchtrees)thatstorevalues1...n?Forexample,Given n =3,thereareatotalof5uniq
pistolove
·
2015-01-27 19:00
java
LeetCode
算法
二叉树
Lettcode
_122_Best Time to Buy and Sell Stock II
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43155725Sayyouhaveanarrayforwhichthe ith elementisthepriceofagivenstockonday i.Designanalgorithmtofindthemaximumprofit.Youmaycomple
pistolove
·
2015-01-26 18:00
java
LeetCode
算法
单调递增
Lettcode
_121_Best Time to Buy and Sell Stock
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43024967Sayyouhaveanarrayforwhichthe ith elementisthepriceofagivenstockonday i.Ifyouwereonlypermittedtocompleteatmostonetransaction
pistolove
·
2015-01-22 20:00
java
LeetCode
算法
单调递增
Lettcode
_137_Single Number II
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42877129Givenanarrayofintegers,everyelementappears three timesexceptforone.Findthatsingleone.Note:Youralgorithmshouldhavealinearrun
pistolove
·
2015-01-19 19:00
java
LeetCode
算法
Lettcode
_145_Binary Tree Postorder Traversal
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42876769Givenabinarytree,returnthe postorder traversalofitsnodes'values.Forexample:Givenbinarytree {1,#,2,3},1 \ 2 / 3 return [3,2,
pistolove
·
2015-01-19 18:00
java
LeetCode
算法
二叉树
Lettcode
_144_Binary Tree Preorder Traversal
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42876699Givenabinarytree,returnthe preorder traversalofitsnodes'values.Forexample:Givenbinarytree {1,#,2,3},1 \ 2 / 3 return [1,2,3
pistolove
·
2015-01-19 18:00
java
LeetCode
算法
二叉树
Lettcode
_94_Binary Tree Inorder Traversal
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42876657Givenabinarytree,returnthe inorder traversalofitsnodes'values.Forexample:Givenbinarytree {1,#,2,3},1 \ 2 / 3 return [1,3,2]
pistolove
·
2015-01-19 18:00
java
LeetCode
算法
二叉树
Lettcode
_141_Linked List Cycle
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42833739Givenalinkedlist,determineifithasacycleinit.Followup:Canyousolveitwithoutusingextraspace?思路:(1)题意为判断一个链表是否带环。这道题在校招笔试和面试中出现
pistolove
·
2015-01-18 09:00
java
LeetCode
算法
链表
Lettcode
_114_Flatten Binary Tree to Linked List
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42744919Givenabinarytree,flattenittoalinkedlistin-place.Forexample,Given1 /\ 25 /\\ 346 Theflattenedtreeshouldlooklike:1 \ 2 \ 3 \
pistolove
·
2015-01-15 18:00
java
LeetCode
算法
二叉树
Lettcode
_49_Anagrams
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42744709Givenanarrayofstrings,returnallgroupsofstringsthatareanagrams.Note:Allinputswillbeinlower-case.思路:(1)如果不知道anagrams的意思,很容易将题
pistolove
·
2015-01-15 18:00
java
LeetCode
算法
Arrays
Lettcode
_12_Integer to Roman
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42744649Givenaninteger,convertittoaromannumeral.Inputisguaranteedtobewithintherangefrom1to3999.思路:(1)题意为给定任意1—3999的整数,将其转化为罗马数字。(2)
pistolove
·
2015-01-15 18:00
java
LeetCode
算法
罗马数字
Lettcode
_136_Single Number
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42713315Givenanarrayofintegers,everyelementappears twice exceptforone.Findthatsingleone.Note:Youralgorithmshouldhavealinearruntimec
pistolove
·
2015-01-14 18:00
java
LeetCode
算法
异或运算
Lettcode
_168_Excel Sheet Column Title
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42554641Givenapositiveinteger,returnitscorrespondingcolumntitleasappearinanExcelsheet.Forexample:1->A 2->B 3->C ... 26->Z 27->AA 28
pistolove
·
2015-01-10 12:00
java
LeetCode
算法
Excel
Lettcode
_36_Valid Sudoku
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42528601DetermineifaSudokuisvalid,accordingto: SudokuPuzzles-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilled
pistolove
·
2015-01-08 19:00
java
LeetCode
二维数组
算法
数独
[置顶]
Lettcode
_172_Factorial Trailing Zeroes
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42417535Givenaninteger n,returnthenumberoftrailingzeroesin n!.Note: Yoursolutionshouldbeinlogarithmictimecomplexity.思路:(1)题意为求解一个整数
pistolove
·
2015-01-05 22:00
Math
LeetCode
算法
Lettcode
_165_Compare Version Numbers
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42342251Comparetwoversionnumbers version1 and version1.If version1 > version2 return1,if version1 1.1.0,返回对应结果。 c:类似1.1.1.0和1.1.
pistolove
·
2015-01-02 16:00
java
LeetCode
算法
版本号
Lettcode
_171_Excel Sheet Column Number
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42290079GivenacolumntitleasappearinanExcelsheet,returnitscorrespondingcolumnnumber.Forexample:A->1 B->2 C->3 ... Z->26 AA->27 AB->2
pistolove
·
2014-12-31 07:00
LeetCode
Math
算法
Lettcode
_169_Majority Element
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42247887Givenanarrayofsize n,findthemajorityelement.Themajorityelementistheelementthatappearsmorethan ⌊n/2⌋ times.Youmayassumethatt
pistolove
·
2014-12-29 22:00
java
LeetCode
算法
遍历
Lettcode
_110_Balanced Binary Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42218839Givenabinarytree,determineifitisheight-balanced.Forthisproblem,aheight-balancedbinarytreeisdefinedasabinarytreeinwhichthede
pistolove
·
2014-12-28 21:00
java
LeetCode
递归
二叉树
[置顶]
Lettcode
_112_Path Sum
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41910495Givenabinarytreeandasum,determineifthetreehasaroot-to-leafpathsuchthataddingupallthevaluesalongthepathequalsthegivensum.For
pistolove
·
2014-12-25 18:00
java
LeetCode
算法
二叉树
栈
Lettcode
_101_Symmetric Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42087039Givenabinarytree,checkwhetheritisamirrorofitself(ie,symmetricarounditscenter).Forexample,thisbinarytreeissymmetric:1 /\ 22
pistolove
·
2014-12-22 21:00
java
LeetCode
算法
递归
二叉树
Lettcode
_100_Same Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42061529Giventwobinarytrees,writeafunctiontocheckiftheyareequalornot.Twobinarytreesareconsideredequaliftheyarestructurallyidentical
pistolove
·
2014-12-22 19:00
LeetCode
算法
递归
二叉树
[置顶] 从"按层次输出二叉树"到"求解二叉树深度"的总结
本文是在学习中的总结,欢迎转载但请注明出处:http://write.blog.csdn.net/postedit/41964669最近在刷
LettCode
上的算法题,发现好多题目的解题思路大体是一致的
pistolove
·
2014-12-16 19:00
LeetCode
算法
总结
分享
Lettcode
_104_Maximum Depth of Binary Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964475MaximumDepthofBinaryTree Givenabinarytree,finditsmaximumdepth.Themaximumdepthisthenumberofnodesalongthelongestpathfromthero
pistolove
·
2014-12-16 19:00
java
LeetCode
数据结构
二叉树
Lettcode
_111_Minimum Depth of Binary Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964249MinimumDepthofBinaryTree Givenabinarytree,finditsminimumdepth.Theminimumdepthisthenumberofnodesalongtheshortestpathfromther
pistolove
·
2014-12-16 18:00
java
LeetCode
数据结构
链表
二叉树
Lettcode
_107_Binary Tree Level Order Traversal II
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41964067Givenabinarytree,returnthe bottom-uplevelorder traversalofitsnodes'values.(ie,fromlefttoright,levelbylevelfromleaftoroot).F
pistolove
·
2014-12-16 18:00
java
LeetCode
数据结构
链表
二叉树
Lettcode
_102_Binary Tree Level Order Traversal
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41929059Givenabinarytree,returnthe levelorder traversalofitsnodes'values.(ie,fromlefttoright,levelbylevel).Forexample:Givenbinarytr
pistolove
·
2014-12-14 21:00
java
LeetCode
二叉树
队列
按层输出
Lettcode
_119_Pascal's Triangle II
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41851069Givenanindex k,returnthe kth rowofthePascal'striangle.Forexample,given k =3,Return [1,3,3,1].Note:Couldyouoptimizeyouralgor
pistolove
·
2014-12-10 20:00
java
LeetCode
算法
链表
杨辉三角
Lettcode
_118_Pascal's Triangle
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41827325Given numRows,generatethefirst numRows ofPascal'striangle.Forexample,given numRows =5,Return[ [1], [1,1], [1,2,1], [1,3,3,1
pistolove
·
2014-12-09 18:00
java
LeetCode
数据结构
算法
杨辉三角
Lettcode
_19_Remove Nth Node From End of List
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41778305Givenalinkedlist,removethe nth nodefromtheendoflistandreturnitshead.Forexample,Givenlinkedlist:1->2->3->4->5,andn=2. After
pistolove
·
2014-12-06 20:00
java
LeetCode
算法
链表
栈
Lettcode
_21_Merge Two Sorted Lists
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41750865Mergetwosortedlinkedlistsandreturnitasanewlist.Thenewlistshouldbemadebysplicingtogetherthenodesofthefirsttwolists.Forexampl
pistolove
·
2014-12-05 22:00
java
LeetCode
算法
链表
LinkedList
上一页
1
2
3
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他