This is a React page
24 |Fig. 1: Classification of Data Structures
30 | 31 | Based on the above structure and arrangement of data, non-primitive data structures are further classified into linear and non-linear. 32 | 33 | ### ***Linear and Non-linear Structures*** 34 | Linear data structures are those where data can be processed in a linear fashion i.e one by one sequentially. It includes the following types of data structures: Arrays, Linked Lists, Stacks & Queues. 35 | Non-linear structures are those in which insertion and deletion are not possible in a linear fashion. It includes the following types of data structures: Trees & Graphs. 36 | 37 | ## Major Operations on Data Structures 38 | 39 | This section discusses the different operations that can be performed on various data structures. 40 | 41 | * ***Traversing : *** 42 | Accessing each record or element from a given file exactly once in order to process it is called traversing. For example, to print the marks of all the students in a class. 43 | 44 | * ***Searching : *** 45 | Finding the location of a given key value in a collection of various data items. 46 | It can be possible that the given key-value may or may not be present in that collection. For example, to find the names of all the people who live in a particular house. 47 | 48 | * ***Inserting : *** 49 | Adding a new element into existing files. For example, to add a particular data of a given student who has just enrolled in a school/college. 50 | 51 | * ***Deleting : *** 52 | Removing the elements from a collection of various data items. For example, to delete the data of a student who has dropped out of a school/college. 53 | 54 | * ***Sorting : *** 55 | Arranging the elements in the file or structure either in some logical order (alphabetically increasing order, decreasing order) or mathematical order. For example, arranging a deck of cards in ascending or descending order. 56 | 57 | * ***Merging : *** 58 | Combining the elements of two similar data structures to a new data structure of the same type. For example, when two lists `List A` and `List B` of size `P` and `Q` respectively, of similar type of elements, are joined to produce the third list, `List C` of size `(P+Q)`, then this process is called merging. 59 | 60 | ## Advantages of Data Structures 61 | 62 | Given below are some important ***advantages of data structures***: 63 | 64 | * Proper choice of data structures makes the program efficient in terms of space and time complexity. 65 | * It provides effective and efficient processing of small as well as a large amount of data. 66 | * They are re-usable. 67 | * They make the code cleaner and easier to understand. 68 | * Data structures are specified by an ADT (Abstract Data Type) which provides a level of abstraction. 69 | -------------------------------------------------------------------------------- /docs/data-structures/size-of-binary-tree.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Size of Binary Tree 3 | slug: /data-structures/size-of-binary-tree 4 | --- 5 | 6 | ## Introduction 7 | 8 | In this article, we will see how to find the size of a binary tree. In other words how many nodes are there in a tree. 9 | 10 | ## Explanation 11 | In this we are given an binary tree. We have to find the size of that binary tree means total number of nodes in binary tree. 12 | #### Example 1 13 |{description}
53 |{siteConfig.tagline}
69 |