Data Structures and Algorithms (DSA) : July 2019
Data Structures and Algorithms (DSA) : July 2019
net/publication/334784415
CITATIONS READS
0 12,306
1 author:
Nada M. Al Hakkak
Baghdad College of Economic Sciences University
32 PUBLICATIONS 21 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Nada M. Al Hakkak on 30 January 2020.
1. Arrays 1
1.1. Introduction……………………………………………………. 2
1.2. Classification of Data Structures………………………………. 4
1.3. Arrays………………………………………………………….. 4
1.4. Array Access Elements………………………………………… 4
1.5. Problems………..……………………………………………… 6
2. Recursion 7
2.1. Introduction……………………………………………………. 8
2.2. Recursion Types……………………………………………….. 10
2.3. Problems……………………………………………………….. 13
3. Linked Data 14
3.1. Introduction……………………………………………………. 15
3.2. Pointers………………………………………………………… 15
3.3. Linked List……………………………………………………... 16
3.4. Doubly Linked List…………………………………………….. 19
3.5. Circular Linked List…………………………………………… 22
3.6. Problems………………………………………………………. 25
4. Stack and Queue 26
4.1. Introduction……………………………………………………. 27
4.2. Stack…………………………………………………………… 27
4.3. Expressions……………………………………………………. 30
4.4. Queue…………………………………………………………... 33
4.5. Circular Queue…………………………………………………. 36
4.6. Problems……………………………………………………….. 39
5. Trees 40
5.1. Introduction……………………………………………………. 41
i
5.2. Complete Binary Tree…………………………………………. 42
5.3. Types of Trees…………………………………………………. 48
5.4. Binary Tree Traversal…………………………………………. 52
5.5. Expression Tree……………………………………………….. 60
5.6. Heap…………………………………………………………… 61
5.7. Binary Search Tree (BST)…………………………………….. 67
5.8. Problems………………………………………………………. 78
6. Sorting and Searching 79
6.1. Introduction……………………………………………………. 80
6.2. Sorting Algorithms…………………………………………….. 80
6.3. Bubble Sort…………………………………………………….. 82
6.4. Insertion Sort…………………………………………………... 83
6.5. Tree Sort……………………………………………………….. 85
6.6. Selection Sort…………………………………………………... 86
6.7. Heap Sort………………………………………………………. 90
6.8. Quick Sort……………………………………………………… 93
6.9. Merge Sort……………………………………………………... 96
6.10. Shell Sort……………………………………………………... 98
6.11. Searching Algorithms………………………………………… 101
6.12. Sequential Searching…………………………………………. 101
6.13. The Indexed Sequential Search………………………………. 101
6.14. The Binary Search…………………………………………… 103
6.15. Hashing……………………………………………………… 105
6.16. Resolving Collisions…………………………………………. 106
6.17. Hashing Function…………………………………………….. 109
6.18. Problems……………………………………………………… 112
7. Graph 113
7.1. Introduction…………………………………………………….. 114
ii
7.2. Graph…………………………………………………………… 115
7.3. Directed Graph…………………………………………………. 118
7.4. Representation of Graphs……………………………………… 119
7.5. Graph Traversal………………………………………………... 126
7.6. Minimal spanning Tree (MST)………………………………… 134
7.7. Problems……………………………………………………….. 148
iii