What are Data Structures ??

Adityavardhan.Nagamalli
2 min readDec 7, 2019

Are Trees fall under Data Structures

Hello everyone, this is Aditya, i am here to share with you regarding Data Structures and Trees.

Introduction

Data Structures are collections of values, the relationships among them, and the functions or operations that can be applied to the data.

Why So Many Data Structures ?

Different Data Structures excel at different things, some are highly specialized , while others are more generally used.

Why Do We Need To Care?

The more time you spend as a developer, the more likely you’ll need to use one of these data structures.You already worked with many of them unknowingly.

And of course.. Definitely needed for INTERVIEWS.

Some of the examples

Q: Working with map/location data ?

A: Use Graph

Q: Need an Ordered List with fast inserts/removals at the beginning and end?

A: Use a Linked List.

Now, we knew about what are data structures and dive into the topic Trees?

OBJECTIVES:

  1. Define what a tree is
  2. Compare and contrast trees and lists
  3. Explain the differences between trees, binary trees, and binary search trees

Implement operations on binary search trees.

What is a Tree ?

A data structure that consists of nodes in a parent / child relationship.

Lists are linear in nature and Trees are non-linear it has n paths to reach the root or destination.

Terminology of a Tree

Root The top node in a tree.

Child A node directly connected to another node when moving away from the Root.

Parent The converse notion of a child

Siblings A group of nodes with the same parent.

Leaf A node with no children

Edge The connection between one node and another.

Types of Trees

  1. Trees
  2. Binary Trees
  3. Binary Search Trees

Trees: We use and view trees mechanism in our daily life and we use it in our day to day activities. Like, You have a music Playlist in your phone it consists of music folder and in that sub folders with tracks and in that songs. The folder and sub-folders and files in that.

Eg: Folders in OS, Computer File System

Binary Trees: Binary trees are examples of Decision Trees , Database Indices and Sorting algorithms.

Binary Search Trees: In the name itself we can know that it is used for searching and retrieval of items of an array quickly.

Conclusion

We learnt about Data Structures and Trees and mechanism of trees and its types. So, that’s it. I am very passionate and happy to share with you all guys, feel free to comment and correct me if any mistakes are there i am very happy to learn new things and correct myself.

--

--

Adityavardhan.Nagamalli

worked as Software Engineer ,Ex-Cognitive Innovations, AWS Cloud Engineer, AWS-CLF-C01, GCP Associate, GCP DevOps