







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to data structures and algorithms, covering the fundamental concepts of data definition, data objects, data types, and basic operations. It explains built-in and derived data types, such as integers, boolean, floating, character, strings, lists, arrays, stacks, queues, and abstract data types (ADTs). The document also discusses the importance of abstract data types, their interface and implementation, and various data structures like linear structures (arrays, linked lists, stacks, queues, priority queues, trees, hash tables, and graphs).
Typology: Lecture notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!








Basic Operations
Sorting: This operation involves arranging the elements in a data
structure in a particular order either ascending or descending.
There are various sorting algorithms that are available for data
structures.
Traversing: We say that we traverse a data structure when we visit
each and every element in the structure. Traversing is required to
carry out certain specific operations on the data structure.
Merging: This operation is combining the records in two different
file into a single file. Combining elements of two similar data
structures to form a new data structure of the same type.
A data type that is defined entirely by a set of operations is referred
to as Abstract data type or simply ADT
Abstract data types are a way of separating the specification and
representation of data types
An ADT is a black box, where users can only see the syntax and
semantics of its operations
An ADT is a combination of interface and implementation The
interface defines the logical properties of the ADT and especially
the signatures of its operations
The implementation defines the representation of data structure and
the algorithms that implement the operations
An abstract data type encapsulates data and functions into a named
data type
Linear structures
Array: Fixed-size
Linked-list: Variable-size
Stack: Add to top and remove from top
Queue: Add to back and remove from front
Priority queue: Add anywhere, remove the highest
priority
Tree: A branching structure with no loops
Hash tables: Unordered lists which use a ‘hash function’ to
insert and search
Graph: A more general branching structure, with less
stringent connection conditions than for a tree
ADT is a data structure and a set of operations which can be
performed on it.
The pre-conditions define a state of the program which the client
guarantees will be true before calling any method
post-conditions define the state of the program that the object's
method will guarantee to create for you when it returns.
create: Create a new collection
add: Add an item to a collection
delete: Delete an item from a collection find Find an item matching
some criterion in the collection
destroy: Destroy the collection
References
_algorithms/index.htm
duction-to-data-structures-and-algorithm-
665
als/