Data Structure Graph has multiple representations, overall there are 3 ways: Adjacency Matrix A two-dimensional matrix, in which the rows represent so… ...more
Type Definition It is usually defined as: struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode() : val(0), left(nullpt… ...more
After solved around 20 questions on leetcode about linked list, I think it is time to summarize everything I learned so far: Type Definition It is usu… ...more
Recent