The best extra credit assignment ever

This was an extra credit assignment for the course "Introduction to the Theory & Design of Programming Languages" (CS 538) taught by Kaiser Pister at UW-Madison. The prompt acknowledged the unfortunate reality of technical interviews, and made me laugh.

The provided prompt

This is a completely optional portion of extra credit. Please use it responsibly. This part of the assignment is to be completed alone.

Many of you are about to graduate and apply for jobs in industry. An unfortunate reality of our field is that potential employees are evaluated on their ability to complete rote algorithmic questions that have no basis in the realiy of being a software engineer. Rather than testing for things like self-motivation, curiosity, or critical thinking ability, we reward students who can memorize the best way to find the pair of numbers in a list sums to zero.

Instead of burying our heads in the sand and crying, we might as well practice so as to do well in the established system, and so we accept our fate.

For this extra credit you must:

  1. Create a leetcode.com account (unless you already have one).

  2. Solve 5 leet code questions with the following difficulties:

    (a) 1 easy problem in a language you have never used before, (ideally have never heard of).

    (b) 2 medium problems in a functional language.

    (c) 2 hard problems, just for good measure.

  3. Record your solutions, and reflect on the process of solving the problems in a less comfortable language. Did you have to think differently to reach the solution? Perhaps you have solved the problem in C++ previously, but now when writing in Haskell, you must account for immutability.

  4. Submit a folder with the following contents to Gradescope HW09-extra

    (a) A screenshot of your successfully passing solution on LeetCode.

    (b) A file containing your solution code.

    (c) A short writeup of how writing the code for this problem went.

Each problem will be worth 4 points of extra credit. If all this sounds tedious to you, consider instead the path of an academic or startup founder.