Code challenges and data structures and algorithms for Codefellows 401 Java course.
- Basics: arrays, loops, binary search
- Linked lists
- Using stacks and queues
- Binary and rose trees
- Sorting
- Hash-based data structures
- Graphs: implementations and algorithms
The challenge asked us to reverse an array. It gave us the option to either reverse the array in place or create a new reversed array. We came up with solutions to both.
Summary for the first code challenge.
Code challenge two asks us to insert an element into the middle of an array. Summary of our second code challenge.
The third code challenge asks us to implement the classic binary search algorithm on a sorted list of int
s. Details on the third code challenge.
We implement a basic linked list class with just a few instance methods. This class will get fleshed out more later. Details on the linked list class.
We build on the linked list class from day 5 and add insertion and deletion to the API.
We continue building on the linked list class and implement a way to access elements by index.
We defined the interface for a stack and a queue and implement both classes using linked lists. Details on the stacks and queues labs.
Our challenge was to implement a Queue using two Stacks.
Our challenge is to implement a queue that accepts elements of different types, allowing us to dequeue the item of a specific type that's been in the queue the longest, and allowing us to dequeue the item of any time that's been in the queue for the longest.
We use a stack to implement a solution to the matching brackets problem, where we validate whether or not the brackets in a string are matching and balanced.
In this series of challenges we're asked to implement various implementations of and algorithms on binary trees. We define a class of binary trees and implement several methods to traverse over the binary tree. Then we extend this class to create a binary search tree, adding insertion and search methods.
In this challenge we're asked to write a method on a binary tree that finds the maximum value in that tree.
In this challenge we're asked to implement a breadth first search on a binary tree.
In this challenge we implement a k-ary tree and then create a new tree based on that original tree according to the "fizz buzz" rules.
In this next week of challenges we are investigating various sorting algorithms. Today's challenge is the basic insertion sort algorithm.
Today's challenge implements the merge sort algorithm.
Today's challenge implements the quick sort algorithm.
We define a Map interface and implement a HashTable with separate chaining (linked list) in this challenge
We define a class that determines word frequency on a String in this challenge.
We implement a variety of graph data structures and investigate their properties.
We implement a number of ways to traverse a graph in this challenge.
We implement a method that takes a sequence of nodes and determines whether the nodes form a path in the given graph. We also implement Dijkstra's algorithm for finding the shortest path in this challenge data structures and investigate their properties.