My Journey to Learning Data Structures from Scratch — Tree

This is Day 10 of #100DaysOfDSA — Tree Data Structure

Prakhar Mishra
1 min readDec 13, 2020
Source

In the last post, we looked into some problems using Deque. In this post, we will start with learning about Tree data structure.

Trees are non-linear data structures that are apt to represent hierarchical data such as folder structure in operating system Drive->Folder->Files. These are recursive in nature with multiple level of sub-trees under each node.

Read https://www.tutorialspoint.com/data_structures_algorithms/tree_data_structure.htm for more theoretical information.

Problems

  1. Insert elements in Tree (Solution)
  2. Implement In-Order Traversal (Solution)
  3. Implement Pre-Order Traversal (Solution)
  4. Implement Post-Order Traversal (Solution)
  5. Implement a function to return if the given element exists in the tree or not (Solution)

Other

  1. Eyeball all the previous problem from Queues.

Also, if you are also into Machine Learning/Natural Language Processing, etc domain, just like me. Make sure to check out detailed Research Paper Walkthroughs on my YT channel.

Cheers!

--

--