Tuesday, December 4, 2018

Say goodbye to Leetcode medium level tree algorithms

Dec. 4, 2018

Introduction


It is my vacation day. I also like to write a blog to document my experience to work on 5 medium level tree algorithms. The learning experience was so great, and the learning is neither too hard nor too easy. It is perfect for me. I never enjoyed so much to experience the learning and training.


My thought process



It is my training to go over medium level Leetcode algorithms. I just reached 100 medium level algorithms. I changed my perspective. Before I will feel very good if I win a gold medal or silver medal on Hackerrank.com. Now I know it is just one more practice on one more algorithm. I can do it every day five medium level algorithms without too much stress.



Medium level tree algorithms (solved 37, total 39, shared 29)
94. Binary Tree Inorder Traversal using stack
94. Binary Tree Inorder Traversal use recursive function
95. Unique Binary Search Trees II
96. Unique Binary Search Trees
98. Validate Binary Search Tree
102. Binary Tree Level Order Traversal submitted in 2015
102. Binary Tree Level Order Traversal submitted in 2018
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
113. Path Sum II
114. Flatten Binary Tree to Linked List
129. Sum Root to Leaf Numbers
145. Binary Tree Postorder Traversal
173. Binary Search Tree Iterator
199. Binary Tree Right Side View
222. Count Complete Tree Nodes
230. Kth Smallest Element in a BST
236. Lowest Common Ancestor of a Binary Tree
337. House Robber III
449. Serialize and Deserialize BST
450. Delete Node in a BST
652. Find Duplicate Subtrees
662. Maximum Width of Binary Tree
654. Maximum binary tree
684. Redundant Connection union find using array
684. Redundant Connection using Dictionary<Int, HashSet>
701 Insert into a binary search tree
841 binary tree pruning
863. All Nodes Distance K in Binary Tree

No comments:

Post a Comment