
什么是循環(huán)依賴 循環(huán)依賴指的是多個(gè)對(duì)象之間的依賴關(guān)系形成一個(gè)閉環(huán)。 下圖展示了兩個(gè)對(duì)象 A 和 B 形成的一個(gè)循環(huán)依賴 下面是個(gè)例子 下圖展示了多個(gè)對(duì)象形成的一個(gè)循環(huán)依賴 如...
在平時(shí)的項(xiàng)目中,會(huì)使用traceId跟蹤請(qǐng)求全流程日志,于是在demo項(xiàng)目中親自實(shí)踐下。 實(shí)現(xiàn)traceId的基本思路 當(dāng)客戶端有請(qǐng)求進(jìn)來時(shí),生成一個(gè)traceId放在Thr...
定義 書上說掐松,“為其他對(duì)象提供一種代理以控制對(duì)這個(gè)對(duì)象的訪問。”起初我覺得這個(gè)定義很抽象大磺,完全不懂抡句,我想換個(gè)說法。如下: 分類 (1)靜態(tài)代理(2)動(dòng)態(tài)代理 實(shí)現(xiàn)及原理 參考...
鏈接:https://leetcode-cn.com/problems/out-of-boundary-paths[https://leetcode-cn.com/probl...
鏈接:https://leetcode-cn.com/problems/decode-ways[https://leetcode-cn.com/problems/decode...
鏈接:https://leetcode-cn.com/problems/find-eventual-safe-states/[https://leetcode-cn.com/...
鏈接:https://leetcode-cn.com/problems/valid-triangle-number/[https://leetcode-cn.com/prob...
鏈接:https://leetcode-cn.com/problems/unique-paths[https://leetcode-cn.com/problems/uniqu...
鏈接:https://leetcode-cn.com/problems/all-nodes-distance-k-in-binary-tree/[https://leetco...
鏈接:https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/[https://leetco...
給定一個(gè)包含非負(fù)整數(shù)的 m x n 網(wǎng)格 grid ,請(qǐng)找出一條從左上角到右下角的路徑袭灯,使得路徑上的數(shù)字總和為最小刺下。 說明:每次只能向下或者向右移動(dòng)一步。
Trie[https://baike.baidu.com/item/%E5%AD%97%E5%85%B8%E6%A0%91/9825209?fr=aladdin](發(fā)音類似 ...
給你一個(gè)整數(shù)數(shù)組 nums 稽荧,數(shù)組中的元素 互不相同 橘茉。返回該數(shù)組所有可能的子集(冪集)。 解集 不能 包含重復(fù)的子集姨丈。你可以按 任意順序 返回解集畅卓。 示例 1: 輸入:nu...
給定一個(gè)數(shù)組 candidates 和一個(gè)目標(biāo)數(shù) target ,找出 candidates 中所有可以使數(shù)字和為 target 的組合蟋恬。 candidates 中的每個(gè)數(shù)字...