Solves the InterviewCake.com problem that asks us to write a function that
returns the number, y, that occurs twice in a list, xs, where xs is an unsorted
list of integers from 1..n with a length of n + 1.
This is just a small org table that I created to help me
Fun fact: In Emacs, you can insert literal TAB character by pressing `C-q
TAB`. For creating tables, using TAB characters feels perfectly
acceptable. Perhaps the TAB name comes from TABle.
Solves an InterviewCake.com problem that returns the index of the element in a
list that should be the first element in that list. It's an exercise that's
useful for seeing other applications of a binary search.
Solves an InterviewCake.com problem that returns all of the permutations of a
string input. The problem states that it's acceptable to assume that your input
string will not have repeated characters, which is why using a Set is
acceptable. I like this solution because it builds a permutations tree and then
assembles all of the permutations by doing a DFT over that tree.
Cameron sent over some property tests for his File.split function, which is a
part of a larger effort to port f.el, a nice library for working with file
paths, over to Haskell.
While I've done these algorithms before, I'm preparing for an on-site with
DeepMind, so I created a subdirectory called deepmind where I'm storing my
second attempts at these problems. The idea of storing them in a second
directory is to remove the urge to check my existing solutions that also exist
in this repository.
This is a work-in-progress. I'd like to add a README to this project to explain
my intention. The goal, roughly, is to port Elisp's fantastic f.el module to
Haskell. I consider Haskell APIs to be useful but somewhat sloppily designed. In
the same spirit as Elixir wrapping Erlang APIs, many of the functions I intend
to define will simply wrap existing Haskell APIs, but with a hopefully cleaner
API that I find more intuitive.
Adds some of the code I generated while studying for a role transfer at Google
using the fantastic resource, InterviewCake.com. This work predates the
mono-repo.
I should think of ways to DRY up this code and the code in
crack_the_coding_interview, but I'm afraid I'm creating unnecessary work for
myself that way.
I believe I have multiple other snippets and attempts scattered across /tmp,
~/programming, and other directories. Again, I created these files and others
before the mono-repo.
Well, unexpectedly (perhaps naively so), I only made it to Day 7. I created
these before I stumbled upon the idea of the mono-repository; otherwise, I like
to think I would have more granular commits introducing this work.