Data Structure Graph problems rely heavily on how the data is represented. While there are three standard academic ways, LeetCode focuses primarily on… ...more
Type Definition In LeetCode problems, the binary tree node is standardly defined as: struct TreeNode { int val; TreeNode* left; TreeNode* … ...more
After solving around 20 LeetCode linked-list problems, here is a concise summary of patterns and templates. Type Definition The standard singly linked… ...more
Recent