Data Structures
and Algorithms in
Java
By Ahmed Alhosani M00007942, Ammar Alhammadi M00007900, Suhail Alhadhrami M00008488, Mohammed
Almazrouei M00007972, Mohammed Aldahmani M00008540
Main Menu
Overview
Interactive menu-based
application.
Allows user to select
data structure or
algorithm.
Each selection routes to
a dedicated module.
Ensures modularity and
clarity in execution.
Arrays
Linear structure for
fixed-size storage.
Operations: Insert,
Delete, Search,
Display.
Implemented using
ArrayList for dynamic
sizing.
Linked Lists
Consists of nodes with
data and pointer to
next.
Operations: Insert at
beginning/end, Delete,
Search, Traverse.
Uses Java's LinkedList
class.
Stacks
LIFO (Last In, First Out)
structure.
Operations: Push, Pop,
Peek, Display.
Implemented using
Java Stack class.
Queues
FIFO (First In, First Out)
structure.
Operations: Enqueue,
Dequeue, Peek, Display.
Implemented using
LinkedList as Queue.
Searching
Algorithms
Linear Search: Checks
each element one by
one.
Binary Search: Divides
sorted array to find
target.
Binary Search requires
sorted input.
Sorting
Algorithms
Bubble Sort: Simple but
inefficient for large
datasets.
Quick Sort: Divide-and-
conquer, efficient
average case.
Merge Sort: Divide-and-
conquer, stable sort.
Trees
Hierarchical structure
with root, left and right
nodes.
Supports Insert, Delete,
Preorder, Inorder,
Postorder traversal.
Implements a Binary
Search Tree.
Graphs
Non-linear structure
with nodes and edges.
Undirected graph using
adjacency list
(HashMap).
Supports DFS and BFS
traversal methods.
Java implementation of fundamental data
structures.
Promotes modular, reusable, and
maintainable design.
Conclusion Essential foundation for advanced
algorithmic topics.
Provides practical and interactive learning
experience.