Skip to content

TroyFernandes/CPS616-Algorithms

Repository files navigation

CPS616-Algorithms

Comparison of O(n2) algorithms (Selection Sort + Merge Sort). Three cases are tested:

  1. Standard Selection Sort
  2. Standard Merge Sort
  3. Merge Sort with Selection Sort when the subarrays are small enough

Large integer multiplication, where the result is too large to be stored in regular integer data types. Strings + Vectors are used to represent these large numbers

Finds the minimum spanning tree of an undirected graph, given as an adjacency matrix using Prim's Algorithm

One thing to note, this version of Prim's is NOT using a binary heap. This is the standard O(|V|2) implementation using an adjacency matrix (which is more rare I think?). Check out the code if you're looking for help on how to implement Prim's using an adjacency matrix.

Implements a greedy algorithm for accommodating bookings in a hotel with N rooms

Finds an optimal solution to the 0/1 Knapsack problem. Two functions are implemented:

  1. The brute force method O(2n)
  2. Dynamic method O(nW) where n = # of items, W = capacity of knapsack

About

Various Labs for CPS616 Algorithms at Ryerson University

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages