Which are the four structures to store strings? Briefly describe with an example each. Solution Answer: In data structure, strings or data is stored in some way so that we can access the stored data during our program. Following are the structures used to store the data : STACKS : In stacks , we push the data from one side and we pop the data from the same side. Thus pushing and popping operations are performed from the same side. This data structure follow the property of LIFO - Last In First Out .That means the first element entered or pushed is thelast element to be popped out. Queue : Like in stacks, we take data from one side and push on the same side. That means only one way to perform both the operations.But in a queue , there is something called FRONT and REAR. From the Rear end we push the data and from the front ewnd we pop up the data. It follows the property of FIFO - First In First Out. That means in a queue, elements entered first is the first to be popped up. Trees : Tree is a data structure in which there is somthing called root, left and right child. Data is stored in many ways. We can traverse the tree in different order . Inorder, post order and preorder. In in order , left child is visited first then the root and then the left child. In post order, left child is visited first then right child then the root. Pre order is first root is visited then left child and the right child. These three different order of traversals give us different order of th data after whole tree is been traversed. Graph : It is a data structure where there is something called vertices and edges. Two vertices forms an edge. Data is searched in a graph by performing two operations called : Depth First Traversal Breadth First Traversal Thus these are the four data structures where data is store and can perform different operations on it. As you have been observed that first two data structures discussed Stack and Queue are linear in fashion called linear data structures while trees and graphs are non linear. .