muyopage · projects

Algorithms Implementation Repository

Algorithms Implementation Repository is a collection of homework tasks, lab files, and algorithms built during the CS201 Data Structures and Algorithms class.

Project Objective

The goal of this repository is to maintain clean, commented implementations of standard algorithmic paradigms for review and reference in higher-level classes.

Contents

The implementations are structured into four main modules:

1. Sorting Algorithms

  • Comparison of Merge Sort, Quick Sort, and Heap Sort using average-case and worst-case execution logs.
  • Memory usage comparisons.

2. Graph Algorithms

  • Breadth-First Search (BFS) and Depth-First Search (DFS).
  • Dijkstra’s Algorithm for single-source shortest path problems.
  • Kruskal’s Algorithm for finding Minimum Spanning Trees (MST).

3. Tree Structures

  • Balanced Binary Search Trees (BST).
  • Self-balancing AVL Trees with insertion, deletion, and rotation routines.

Performance Analysis

Each algorithm includes a brief analysis explaining its asymptotic time and space complexities. For example:

// Binary Search - Time Complexity: O(log n)
int binarySearch(int arr[], int left, int right, int x) {
while (left <= right) {
int mid = left + (right - left) / 2;
if (arr[mid] == x) return mid;
if (arr[mid] < x) left = mid + 1;
else right = mid - 1;
}
return -1;
}

This repository served as my main coding preparation catalog for the final lab exam.