什么是循環(huán)依賴 循環(huán)依賴指的是多個對象之間的依賴關(guān)系形成一個閉環(huán)。 下圖展示了兩個對象 A 和 B 形成的一個循環(huán)依賴 下面是個例子 下圖展示了多個對象形成的一個循環(huán)依賴 如...
在平時的項目中,會使用traceId跟蹤請求全流程日志,于是在demo項目中親自實踐下。 實現(xiàn)traceId的基本思路 當(dāng)客戶端有請求進(jìn)來時,生成一個traceId放在Thr...
定義 書上說,“為其他對象提供一種代理以控制對這個對象的訪問。”起初我覺得這個定義很抽象,完全不懂,我想換個說法。如下: 分類 (1)靜態(tài)代理(2)動態(tài)代理 實現(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...
給定一個包含非負(fù)整數(shù)的 m x n 網(wǎng)格 grid ,請找出一條從左上角到右下角的路徑,使得路徑上的數(shù)字總和為最小。 說明:每次只能向下或者向右移動一步。
Trie[https://baike.baidu.com/item/%E5%AD%97%E5%85%B8%E6%A0%91/9825209?fr=aladdin](發(fā)音類似 ...
給你一個整數(shù)數(shù)組 nums ,數(shù)組中的元素 互不相同 。返回該數(shù)組所有可能的子集(冪集)。 解集 不能 包含重復(fù)的子集。你可以按 任意順序 返回解集。 示例 1: 輸入:nu...
給定一個數(shù)組 candidates 和一個目標(biāo)數(shù) target ,找出 candidates 中所有可以使數(shù)字和為 target 的組合。 candidates 中的每個數(shù)字...