Algorithms and Data Structures JAVA
Algorithms and Data Structures JAVA
Objective: To reinforce knowledge of problem solving techniques, data structure concepts and
analysis of different algorithms using Java.
Text Book:
o Data Abstraction and Problem Solving with Java: Walls and Mirrors by Janet Prichard , Frank M.
Carrano / Pearson
References:
• Problem Solving: Best Strategies to Decision Making, Critical Thinking and Positive Thinking by
Thomas Richards / Kindle Edition
• Data Abstraction and Problem Solving with Java: Walls and Mirrors by Janet Prichard , Frank M.
Carrano / Pearson
• Object-oriented Analysis and Design Using UML - An Introduction to Unified Process and Design
Patterns by Mahesh P. Matha / PHI
• Introduction to Algorithms by Cormen, Leiserson, Rivest and Stein
Sessions 2 & 3:
Algorithms & Data Structures
Objective: At the end of the session students should know, what is the importance of data structure in
problem solving. How stacks, queues, circular queues work. Their real world applications. How to solve
problems using these data structures.
z
Lecture:
● Introductory Concepts
● Algorithm Constructs
● Complexity analysis of algorithms (Big O notation )
● OO design: Abstract Data Types (ADTs)
● Basic Data Structures
o Arrays
o Stacks
o Queues
o Circular Queues
Lab:
● Implement stack through array
● Complexity analysis of loops and recursive algorithms.
● Implement queues with inserting element at different location (First, Last)
● Implement circular queue
Sessions 4 & 5:
Linked List Data Structures
Objective: At the end of the session students should know, what are applications of Linked List, different
types of link list. Comparison with arrays as when to use linked list and when to use array.
Lecture:
● Linked lists
o Singly linked lists
o Doubly linked lists
o Circular linked lists
o Node-based storage with arrays
Lab:
● Implement circular queue using linked list
● Implement stack using linked list
Session 6:
Recursion
Objective: At the end of the session students should know what is recursion, type of recursion, local
variable in recursion, stack manipulation during recursion, function complexity
Lecture & Lab:
● What is recursion?
● What is the base condition in recursion.
● Direct and indirect recursion.
● Memory is allocated to different function calls in recursion.
● Pro and cons of recursion
● Function complexity during recursion
Sessions 7 & 8:
Trees & Applications
Objective: At the end of the session students should know what is the use of binary trees, how to create
binary search trees. Different tree traversals. What are the applications of binary trees? How to
calculate search complexity in binary search trees? What are the limitations of binary search trees?
What are different options to overcome the binary search tree limitations.
z
Lecture:
● Introduction to trees
● Trees and terminology
● Tree traversals
● Binary trees
● Complete binary trees / Almost complete binary tree (ACBT)
● Array implementation of ACBT
● Binary search trees
● AVL tree
Lab:
● Write a program to implement a binary search tree and the following operations on it:
o Create()
o Tree traversals - Breadth First Search, Depth First Search, Inorder(), Preorder(), Postorder()
o Delete()
Session 12:
Hash Functions and Hash Tables
Objective: At the end of the session students should know what is hashing, what is the importance of
hashing, comparative complexity of hashing with other search techniques. Problems (collision) with
hashing and what are the different solutions of that.
Lecture:
● Hashing & Introduction to hash tables
● Hash Functions
● Different type of hash functions
z
● Collision Resolution
● Linear Probing
● Quadratic Probing
● Double Hashing
● Inserting and Deleting an element from a hash table
Lab:
● Implement hashing techniques in different programs solved earlier
● Write a program to implement Hash table
● Fibonacci recursive algorithm improvement using hash table