Data Structure


In this section, we will implement our own naive data structure class using Java language (There can be a more clever implementation but this is for simple explanation only).

Note: These implementations are naive and simple, haven't been thoroughly tested, please do not use in production, it is meant for simple explanation only.

Basic array data structure explanation, implementation and time complexity analysis, we will implement array list.

Linked list implemented using pointers/references, we will implement single linked list here.

Hash Table implementation using bucket (array) and linked list, its usefulness and time complexity analysis

Stack is first in last out (FILO) and can be implemented using linked list or array. we will see both and compare them.

Queue is first in first out (FIFO) and can also be implemented using linked list or array. we will see both and compare them.

Tree based structure that satisfy heap property but implemented using array.

Tree is implemented using pointers/references and can have certain property. We will implement binary tree here.


In these examples, we are just trying to store integers and string and organise them using a structure so we can see how they are stored. We can see that there is some strength and weakness in each structure. There are many ways to implements these data structure and we will see some way of implementation in these examples but there are more clever ways to implement them.