經(jīng)典算法真題演練【進(jìn)階】

模擬

134.加油站 https://leetcode-cn.com/problems/gas-station/

146.LRU緩存機(jī)制 https://leetcode-cn.com/problems/lru-cache/

289.生命游戲 https://leetcode-cn.com/problems/game-of-life/

371.兩整數(shù)之和 https://leetcode-cn.com/problems/sum-of-two-integers/

412.FizzBuzz https://leetcode-cn.com/problems/?zz-buzz/

202.快樂(lè)數(shù) https://leetcode-cn.com/problems/happy-number/

數(shù)組

152.乘積最大子序列 https://leetcode-cn.com/problems/maximum-product-subarray/

169.求眾數(shù) https://leetcode-cn.com/problems/majority-element/

189.旋轉(zhuǎn)數(shù)組 https://leetcode-cn.com/problems/rotate-array/

217.存在重復(fù)元素 https://leetcode-cn.com/problems/contains-duplicate/

283.移動(dòng)零 https://leetcode-cn.com/problems/move-zeroes/

384.打亂數(shù)組 https://leetcode-cn.com/problems/shu?e-an-array/

350.兩個(gè)數(shù)組的交集II https://leetcode-cn.com/problems/intersection-of-two-arrays-ii/

334.遞增的三元子序列 https://leetcode-cn.com/problems/increasing-triplet-subsequence/

240.搜索二維矩陣II https://leetcode-cn.com/problems/search-a-2d-matrix-ii/

238.除自身以外數(shù)組的乘積 https://leetcode-cn.com/problems/product-of-array-except-self/

鏈表

138.復(fù)制帶隨機(jī)指針的鏈表 https://leetcode-cn.com/problems/copy-list-with-random-pointer/

141.環(huán)形鏈表 https://leetcode-cn.com/problems/linked-list-cycle/

148.排序鏈表 https://leetcode-cn.com/problems/sort-list/

160.相交鏈表 https://leetcode-cn.com/problems/intersection-of-two-linked-lists/

206.反轉(zhuǎn)鏈表 https://leetcode-cn.com/problems/reverse-linked-list/

234.回文鏈表 https://leetcode-cn.com/problems/palindrome-linked-list/

237.刪除鏈表中的節(jié)點(diǎn) https://leetcode-cn.com/problems/delete-node-in-a-linked-list/

328.奇偶鏈表 https://leetcode-cn.com/problems/odd-even-linked-list/

155.最小棧 https://leetcode-cn.com/problems/min-stack/

215.數(shù)組中的第K個(gè)最大元素 https://leetcode-cn.com/problems/kth-largest-element-in-an-array/

295.數(shù)據(jù)流的中位數(shù) https://leetcode-cn.com/problems/?nd-median-from-data-stream/

378.有序矩陣中第K小的元素 https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix/

347.前K個(gè)高頻元素 https://leetcode-cn.com/problems/top-k-frequent-elements/

150.逆波蘭表達(dá)式求值 https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/

227.基本計(jì)算器II https://leetcode-cn.com/problems/basic-calculator-ii/

341.扁平化嵌套列表迭代器 https://leetcode-cn.com/problems/?atten-nested-list-iterator/

哈希/Map

171.Excel表列序號(hào) https://leetcode-cn.com/problems/excel-sheet-column-number/

454.四數(shù)相加II https://leetcode-cn.com/problems/4sum-ii/

380.常數(shù)時(shí)間插入裂逐、刪除和獲取隨機(jī)元素 https://leetcode-cn.com/problems/insert-delete-getrandom-o1/

隊(duì)列

239.滑動(dòng)窗口最大值 https://leetcode-cn.com/problems/sliding-window-maximum/

樹(shù)

230.二叉搜索樹(shù)中第K小的元素 https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst/

236.二叉樹(shù)的最近公共祖先 https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/

297.二叉樹(shù)的序列化與反序列化 https://leetcode-cn.com/problems/serialize-and-deserialize-binary-tree/

線段樹(shù)

218.天際線問(wèn)題 https://leetcode-cn.com/problems/the-skyline-problem/

排序

179.最大數(shù) https://leetcode-cn.com/problems/largest-number/

324.擺動(dòng)排序II https://leetcode-cn.com/problems/wiggle-sort-ii/

滑動(dòng)窗口

395.至少有K個(gè)重復(fù)字符的最長(zhǎng)子串 https://leetcode-cn.com/problems/longest-substring-with-at-least-k-repeating-characters/

動(dòng)態(tài)規(guī)劃

124.二叉樹(shù)中的最大路徑和 https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/

128.最長(zhǎng)連續(xù)序列 https://leetcode-cn.com/problems/longest-consecutive-sequence/

198.打家劫舍 https://leetcode-cn.com/problems/house-robber/

279.完全平方數(shù) https://leetcode-cn.com/problems/perfect-squares/

300.最長(zhǎng)上升子序列 https://leetcode-cn.com/problems/longest-increasing-subsequence/

322.零錢兌換 https://leetcode-cn.com/problems/coin-change/

329.矩陣中的最長(zhǎng)遞增路徑 https://leetcode-cn.com/problems/longest-increasing-path-in-a-matrix/

圖論

127.單詞接龍 https://leetcode-cn.com/problems/word-ladder/

200.島嶼的個(gè)數(shù) https://leetcode-cn.com/problems/number-of-islands/

207.課程表 https://leetcode-cn.com/problems/course-schedule/

210.課程表II https://leetcode-cn.com/problems/course-schedule-ii/

數(shù)學(xué)&位運(yùn)算

136.只出現(xiàn)一次的數(shù)字 https://leetcode-cn.com/problems/single-number/

149.直線上最多的點(diǎn)數(shù) https://leetcode-cn.com/problems/max-points-on-a-line/

166.分?jǐn)?shù)到小數(shù) https://leetcode-cn.com/problems/fraction-to-recurring-decimal/

172.階乘后的零 https://leetcode-cn.com/problems/factorial-trailing-zeroes/

190.顛倒二進(jìn)制位 https://leetcode-cn.com/problems/reverse-bits/

191.位1的個(gè)數(shù) https://leetcode-cn.com/problems/number-of-1-bits/

204.計(jì)數(shù)質(zhì)數(shù) https://leetcode-cn.com/problems/count-primes/

268.缺失數(shù)字 https://leetcode-cn.com/problems/missing-number/

326.3的冪 https://leetcode-cn.com/problems/power-of-three/

字符串

125.驗(yàn)證回文串 https://leetcode-cn.com/problems/valid-palindrome/

131.分割回文串 https://leetcode-cn.com/problems/palindrome-partitioning/

139.單詞拆分 https://leetcode-cn.com/problems/word-break/

140.單詞拆分II https://leetcode-cn.com/problems/word-break-ii/

208.實(shí)現(xiàn)Trie(前綴樹(shù)) https://leetcode-cn.com/problems/implement-trie-pre?x-tree/

212.單詞搜索II https://leetcode-cn.com/problems/word-search-ii/

242.有效的字母異位詞 https://leetcode-cn.com/problems/valid-anagram/

387.字符串中的第一個(gè)唯一字符 https://leetcode-cn.com/problems/?rst-unique-character-in-a-string/

344.反轉(zhuǎn)字符串 https://leetcode-cn.com/problems/reverse-string/

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末坎背,一起剝皮案震驚了整個(gè)濱河市埂淮,隨后出現(xiàn)的幾起案子倒谷,更是在濱河造成了極大的恐慌,老刑警劉巖衣式,帶你破解...
    沈念sama閱讀 217,657評(píng)論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件寸士,死亡現(xiàn)場(chǎng)離奇詭異檐什,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)弱卡,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,889評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門乃正,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人谐宙,你說(shuō)我怎么就攤上這事烫葬。” “怎么了凡蜻?”我有些...
    開(kāi)封第一講書(shū)人閱讀 164,057評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵搭综,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我划栓,道長(zhǎng)兑巾,這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,509評(píng)論 1 293
  • 正文 為了忘掉前任忠荞,我火速辦了婚禮蒋歌,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘委煤。我一直安慰自己堂油,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,562評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布碧绞。 她就那樣靜靜地躺著府框,像睡著了一般。 火紅的嫁衣襯著肌膚如雪讥邻。 梳的紋絲不亂的頭發(fā)上迫靖,一...
    開(kāi)封第一講書(shū)人閱讀 51,443評(píng)論 1 302
  • 那天,我揣著相機(jī)與錄音兴使,去河邊找鬼系宜。 笑死,一個(gè)胖子當(dāng)著我的面吹牛发魄,可吹牛的內(nèi)容都是我干的盹牧。 我是一名探鬼主播,決...
    沈念sama閱讀 40,251評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼欠母,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼欢策!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起赏淌,我...
    開(kāi)封第一講書(shū)人閱讀 39,129評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎啄清,沒(méi)想到半個(gè)月后六水,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體俺孙,經(jīng)...
    沈念sama閱讀 45,561評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,779評(píng)論 3 335
  • 正文 我和宋清朗相戀三年掷贾,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了睛榄。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,902評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡想帅,死狀恐怖场靴,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情港准,我是刑警寧澤旨剥,帶...
    沈念sama閱讀 35,621評(píng)論 5 345
  • 正文 年R本政府宣布,位于F島的核電站浅缸,受9級(jí)特大地震影響轨帜,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜衩椒,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,220評(píng)論 3 328
  • 文/蒙蒙 一蚌父、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧毛萌,春花似錦苟弛、人聲如沸。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,838評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至冀痕,卻和暖如春荔睹,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 32,971評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留殉农,地道東北人今缚。 一個(gè)月前我還...
    沈念sama閱讀 48,025評(píng)論 2 370
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像务唐,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,843評(píng)論 2 354