文章
Convert Sorted List to Binary Search Tree
1.ProblemGivenasinglylinkedlistwhereelementsaresortedinascendingorder,convertittoaheightbalancedBST.2.Anylysis升序的单链
[leetcode] Find Minimum in Rotated Sorted Array II
code:https://play.golang.org/p/luj1fdu03F(https://play.golang.org/p/luj1fdu03F)problem:https://oj.leetcode.com/problems/findminimuminrotatedso
[leetcode]Maximum Product Subarray
<pre<codeclassSolution{public://和最大子串和不同的是:需要同时记录最大的正数和最小的负数intmaxProduct(intA,intn){if(n0)return0;if(n1
Distinct Subsequences
ProblemGivenastringSandastringT,countthenumberofdistinctsubsequencesofTinS.Asubsequenceofastringisane
Largest Rectangle in Histogram
ProblemGiven_n_nonnegativeintegersrepresentingthehistogram&39;sbarheightwherethewidthofeachbaris1,findtheareaoflargestr
LeetCode 4
MaxPointsonaLinehttps://oj.leetcode.com/problems/maxpointsonaline/(https://oj.leetcode.com/problems/maxpointsonaline/)Givennpo
LeetCode 3
EvaluateReversePolishNotationhttps://oj.leetcode.com/problems/evaluatereversepolishnotation/(https://oj.leetcode.com/problems/evaluatere
LeetCode 2
ReverseWordsinaStringhttps://oj.leetcode.com/problems/reversewordsinastring/(https://oj.leetcode.com/problems/reversewordsinastring
LeetCode 1
SingleNumberhttps://oj.leetcode.com/problems/singlenumber/(https://oj.leetcode.com/problems/singlenumber/)Givenanarrayofintegers,eve
[leetcode]copy-list-with-random-pointer
思路链表里面的顺序是个很麻烦的事,如果要复制的时候保留相互关系,以原链表为基础,当做一个模子,直接在上面弄一份一份副本,就像做一把钥匙,倒个模子。又或者像草履虫,无性繁殖,biaji,生出一个新的。Solution1<pre<code/Defini
已加载文章中没有匹配内容,试试其他关键词或清空搜索。