0% found this document useful (0 votes)
3 views1 page

I Data Structures 8

The document outlines the contents of a book focused on data structures, including linked lists and binary search trees. It provides an introduction, assumed knowledge, pseudocode, and tips for working through examples, as well as detailed sections on various data structures and their operations. Each section includes topics such as insertion, searching, deletion, and traversal methods.

Uploaded by

mifeli8195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

I Data Structures 8

The document outlines the contents of a book focused on data structures, including linked lists and binary search trees. It provides an introduction, assumed knowledge, pseudocode, and tips for working through examples, as well as detailed sections on various data structures and their operations. Each section includes topics such as insertion, searching, deletion, and traversal methods.

Uploaded by

mifeli8195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Contents

1 Introduction 1
1.1 What this book is, and what it isn’t . . . . . . . . . . . . . . . . 1
1.2 Assumed knowledge . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 Big Oh notation . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.2 Imperative programming language . . . . . . . . . . . . . 3
1.2.3 Object oriented concepts . . . . . . . . . . . . . . . . . . 4
1.3 Pseudocode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Tips for working through the examples . . . . . . . . . . . . . . . 6
1.5 Book outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Where can I get the code? . . . . . . . . . . . . . . . . . . . . . . 7
1.8 Final messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

I Data Structures 8
2 Linked Lists 9
2.1 Singly Linked List . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.1 Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.2 Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.3 Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.4 Traversing the list . . . . . . . . . . . . . . . . . . . . . . 12
2.1.5 Traversing the list in reverse order . . . . . . . . . . . . . 13
2.2 Doubly Linked List . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.2 Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.3 Reverse Traversal . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3 Binary Search Tree 19


3.1 Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 Finding the parent of a given node . . . . . . . . . . . . . . . . . 24
3.5 Attaining a reference to a node . . . . . . . . . . . . . . . . . . . 24
3.6 Finding the smallest and largest values in the binary search tree 25
3.7 Tree Traversals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.7.1 Preorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

You might also like