leetcode 84. Largest Rectangle in Histogram 題目要求Given n non-negative int...
30 Substring with Concatenation of All Words 題目: 給出一串字符串 s=“foobarbarth...
97. Interleaving String Given a list of unique words. Find all pairs of ...
hashSet是很好用的,但是,如果key太長(zhǎng)了,怎么優(yōu)化呢? 187. Repeated DNA Sequences 題目 給出一個(gè)DNA字符...
在leetcode 60Permutation Sequence最開(kāi)始使用DFS,超時(shí),后來(lái)找規(guī)律: 1)第k個(gè)排列的第一個(gè)元素在0-n中的位置...
最好思考一下前后的關(guān)系,能不能用已知, 來(lái)減小重復(fù)計(jì)算。 一、 Range Sum Query 2D - Immutable 思路 在初始化的時(shí)...
132. Palindrome Partitioning II 這道題考的是怎么用dp來(lái)解決dfs的問(wèn)題如果僅使用dfs,即使加了剪枝,這道題還...
一、字符集 規(guī)定了某個(gè)文字對(duì)應(yīng)的二進(jìn)制數(shù)字存放方式(編碼)和某串二進(jìn)制數(shù)值代表了哪個(gè)文字(解碼)的轉(zhuǎn)換關(guān)系。對(duì)應(yīng)到真實(shí)生活中,字符集就是對(duì)某種語(yǔ)...
Find the Duplicate Number https://segmentfault.com/a/1190000003817671看這個(gè)就好了