A Library of Interview Question Algorithms

I recently spent some time revising for programming interview questions, and having done all of that work I wondered what I could do with it.

The result is a git repo of interview question algorithms that I’ve structured as a somewhat tongue-in-cheek utility; the kind of utility that i’d love to be able to use in a programming interview, but the kind would probably negate the point of the interview question in the first place.

The library solves programming questions that keep popping up, whether in books or online on sites such as HackerRank. This includes solutions to the following problems:

Strings

Arrays

Graphs

Lists

Math

Sorting / Search

 

Project Euler

As an extra bit of practice, I also created a repo of solutions to Project Euler problems. These were mostly based on the HackerRank version of the problems, which typically require the most efficient solution to the problem rather than a single solution to a given input.

Tutorial Notes (on Data Structures and Algorithms)

This year marked the first time I’d tutored on a second year course, Foundations of Computation. Of the topics covered I produced notes and code to help explain lists, search algorithms, and trees. I’ve included them below in the hope they may be useful.

Algorithms for finding cycles in Linked Lists (GitHub repository). The included code runs various algorithms to find cycles, and graphs the efficiency of each algorithm.

Search Algorithms Comparison (GitHub repository). The included code implements three search algorithms (Selection, Insertion, and Merge Sort) and includes various levels of debug to show the process taken by each algorithm and to count the number of comparisons and swaps involved.

Cheat sheet for Balancing AVL Trees (Google Docs). A very brief guide explaining what operations must be performed to balance and AVL tree.