![240](https://upload.jianshu.io/users/upload_avatars/2778947/66cbab3a-7c3c-482e-b796-79a1615a239d.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/240/h/240)
Leetcode 恢復(fù)二叉搜索樹 分析:首先題目壽命恰好存在兩個錯誤節(jié)點(diǎn)全封;因?yàn)槎嫠阉鳂涞闹行虮闅v一定是有序的缺厉,那么原有問題就轉(zhuǎn)化為該有序的數(shù)組...
1 Redis網(wǎng)絡(luò)協(xié)議詳解 redis的網(wǎng)路協(xié)議全名是Redis Serialization Protocol (RESP), 它設(shè)計五項(xiàng),如下...
題目 方法1:使用雙棧恋拍。 既然回車就是刪除一個字符,那非常符合進(jìn)棧出棧的思路藕甩。沒遇到一個#就是出棧一個字符(如果検└遥空則不管)。以此為思路狭莱,代碼如...
Given a positive integer n, find the least number of perfect square numb...
題目:Given a positive integer n, break it into the sum of at least two pos...
動態(tài)規(guī)劃:將原問題拆解成若干子問題僵娃,同時保存子問題的答案,使得每個子問題只求解一次腋妙,最終獲得原問題的答案默怨。 Given a triangle, ...
題目 Given a collection of distinct integers, return all possible permutat...
1背景 關(guān)于水塘抽樣的算法原理此處不再說明了, 本文重點(diǎn)是針對它的一種應(yīng)用場景, 具體算法原理可參考水塘抽樣算法原理 2問題: 在編寫Spark...