Binary search tree

A binary search tree is a binary tree, with the content of all elements in the left subtree of a node are lesser than the content in the parent. Whereas all nodes content in its right subtree are greater than its parent. Let’s see below two example binary search trees. As observed in the aboveRead More »

Stack data structure

Stack is the most popular and historical data structure. A list of items arranged one on top of others. Stack data structure popularly used to maintain program memory stack. It follows the last-in-first-out order. Let’s consider a stack of discs as shown in the below picture. As shown in this diagram, only the top nodeRead More »

Circular Linked List

A circular linked list is one type of linked list on which the last node links with the head node and form circular. Let’s see some pictorial representation of the circular list. Now, let’s take an example and solve basic operations. Insert Delete Insert Insert operation done in two different ways, insert at the endRead More »

Singly Linked List data structure

Major drawback while inserting, deleting into arrays is to shift all elements right side when insert or delete element to satisfy arrays continuous memory policy. Linked List data structure came up with random memory linking of nodes to overcome the above shifting problem. These nodes can be linked/chained to the next node memory location, theRead More »

Array data structure

As mentioned in its dictionary meaning, the array is “range of particular type of things”. Here in computer science array is a range of the same types of objects. Objects here represents any programming language objects i.e., char, short, int, float, double or Object…etc. It stores in contiguous memory locations in the application memory. Let’sRead More »