A compilation of exercises, labs, and projects as part of my summer proficiency exam preparation for UIUC's CS 125 course.
Completed set of class exercises (organized by topic/concept) from available CS 125 Lectures & Slides.
Implementation of some interesting algorithms accounting for runtime/complexity issues. One algorithm that stands out is located in EuclidianGCD.java
and provides two different Euclidian Greatest Common Denominator solutions.
1D & 2D Array Manipulation.
Quick exercises with examples on how to handle the three types of exceptions (Checked, Unchecked, Error) in Java.
Functions made to implement certain algorithms, along with an intro to method overloading.
Useful implementations of Java Generics and common in-built data structures.
Implementation of an ArrayList and Singly LinkedList class.
Working with objects and an intro to inheritance & overriding.
-
- Understanding upcasting, downcasting, and different variations of polymorphism.
-
- Understanding how object references are stored in arrays and variables in Java.
-
- Understanding interfaces in Java.
Overview of various sorting algorithms in Java.
Functions that implement certain string-operating algorithms.
Working with a BinaryTree & BinarySearchTree implementation and other recursion exercises.
Selectively completed set of labs from available CS 125 Labs
- Lab 1: Least Common Multiple Finder
- Lab 2: Caesar Cipher w/ ROT13 Encryption
Provided challenges from the designated course on PrarieLearn.
Contains a function called rotateRight that takes a String as its first argument and a positive int as its second argument and rotates the String right by the given number of characters. Any characters that get moved off the right side of the string wrap around to the left.
Checks a 3-by-3 Tic-Tac-Toe board for a winner. Functions receives an input of a 3-by-3 two-dimensional array of characters, with each space containing an X, O, or a . if nobody has played in that position. Returns X, O, or tells user if no player has won yet.
Implementation of a class called LastTen that contains two public methods:
void add(int newValue)
: add a new integer to the remembered values.int[] getLastTen()
: return the last ten values that were added using add. Return zeroes in place of unadded values.
Designed a class called Max that provides a single class method called max. The max method takes two arguments to objects that can be compared, that implement the Java Comparable interface as shown above. Returns a reference to whichever is larger.
Completed implementation of the SimpleList
interface shown above in a class called SimpleArrayList
.
Completed implementation of a LinkedList that uses a linked list of Item
objects internally.
Completed implementation of a BinaryTree
class with a sum function that returns the sum taking into account all nodes of the tree.
Completed implementation of a method for the BinaryTree
class which lets the user know whether the tree is height balanced.
Completed implementation of an InsertionSorter
class which returns the number of swaps needed to perform a proper insertion sort on an array.
Completed implementation of a Faulter
class whose constructor takes a single String argument and only method fault()
returns an Exception.
Created a method called Map<Object,Integer> valueCount()
that returns a Map mapping each object in the tree to the number of times that it appears.