data structures using front rear figure array representation of queue herefront and rear if we want to add one more value to the listsayif we want to add another element with the value then the rear would be incremented by and the value would be stored at the position pointed by the rear the queueafter the additionwould be as shown in fig herefront and rear every time new element is to be addedwe will repeat the same procedure front rear figure queue after insertion of new element nowif we want to delete an element from the queuethen the value of front will be incremented deletions are done only from this end of the queue the queue after the deletion will be as shown in fig front rear figure queue after deletion of an element howeverbefore inserting an element in the queuewe must check for overflow conditions an overflow occurs when we try to insert an element into queue that is already full queue is full when rear max where max is the size of the queuethat is max specifies the maximum number of elements in the queue note that we have written max because the index starts from similarlybefore deleting an element from the queuewe must check for underflow conditions an underflow condition occurs when we try to delete an element from queue that is already empty if front null and rear nullthen there is no element in the queue trees tree is non-linear data structure which consists of collection of nodes arranged in hierarchical order one of the nodes is designated as the root nodeand the remaining nodes can be partitioned into disjoint sets such that each set is sub-tree of the root the simplest form of tree is binary tree binary tree consists of root node and left and right sub-treeswhere both sub-trees are also binary trees each node contains data elementa left pointer which points to the left sub-treeand right pointer which points to the right sub-tree the root element is the topmost node which is pointed by 'rootpointer if root null then the tree is empty figure shows binary treewhere is the root node and and are the left and right subtrees of if is non-emptythen is said to be the left successor of likewiseif is non-emptythen it is called the right successor of