This repository contains my Java programming assignments that I completed while auditing Princeton's COS 226.
The course focuses on the implementation of various data structures and algorithms. It also concentrates on the time and space complexities of each of them. Topics covered can be found here, but I'll abstract more on the material below.
Most of the dependencies that I used are contained within the course's algs4.jar. This can be found, along with installation instructions, at this link. The same link also has any needed java programs and libraries that may not be in the .JAR file. Note that I littered much of the code with block comments because I wanted my logic to be explicit for my grader.
Assignment | Description | Topics Learned |
---|---|---|
Estimate the percolation threshold of a composite system
|
quick-union, weighted quick-union, Monte Carlo method
|
|
Create Deque and RandomizedQueue objects
|
linked lists, stacks, queues, deques, Java iterators
|
|
Autocomplete feature for user queries
|
selection sort, insertion sort, binary search, mergesort, quicksort, Java comparators
|
|
Solver for any k-puzzle
|
A* search, priority queues/heaps, heapsort
|
|
Create a 2D space partitioning binary search tree API
|
binary search trees, 2-3 trees, red-black trees, B-trees, kd-trees
|
|
Build a WordNet object with built-in search methods
|
hash tables, depth-first search, breadth-first search, topological sort, minimum spanning trees, Kruskal's algorithm, Prim's algorithm
|
|
Content-aware image resizing API
|
Bellman-Ford algorithm, Dijkstra's algorithm, Ford-Fulkerson algorithm, MinCuts, MaxFlows
|