in fig node is the left child and node is the right child of the root node note that the left sub-tree of the root node consists of the nodes and similarlythe right sub-tree of the root node consists of the nodes and note advantageprovides quick searchinsertand delete operations disadvantagecomplicated deletion algorithm graphs graph is non-linear data structure which is collection of vertices (also called nodesand edges that connect these vertices graph is often viewed as generalization of the tree structurewhere instead of purely parent-to-child relationship between tree nodesany kind of complex relationships between the nodes can exist in tree structurenodes can have any number of children but only one parenta graph on the other hand relaxes all such kinds of restrictions figure shows graph with five nodes node in the graph may represent city and the edges connecting the nodes can represent roads graph can also be used to represent computer network where the nodes are workstations and the edges are the network connections graphs have so many applications in computer science and mathematics that several algorithms have been written to perform the standard graph operationssuch as searching the graph and finding the shortest path between the nodes of graph note that unlike treesgraphs do not have any root node ratherevery node in the graph can be connected with every another node in the graph when two nodes are connected via an edgethe two nodes are known as neighbours for examplein fig node has two neighboursb and figure binary tree figure graph note advantagebest models real-world situations disadvantagesome algorithms are slow and very complex operations on data structures this section discusses the different operations that can be performed on the various data structures previously mentioned traversing it means to access each data item exactly once so that it can be processed for exampleto print the names of all the students in class searching it is used to find the location of one or more data items that satisfy the given constraint such data item may or may not be present in the given collection of data items for exampleto find the names of all the students who secured marks in mathematics inserting it is used to add new data items to the given list of data items for exampleto add the details of new student who has recently joined the course deleting it means to remove (deletea particular data item from the given collection of data items for exampleto delete the name of student who has left the course sorting data items can be arranged in some order like ascending order or descending order depending on the type of application for examplearranging the names of students in class in an alphabetical orderor calculating the top three winners by arranging the participantsscores in descending order and then extracting the top three merging lists of two sorted data items can be combined to form single list of sorted data items