#+title: Data Structures And Algorithms Studying in C++ #+author: Jesse Millwood #+email: jesse@millwood.earth #+startup: showall indent #+options: toc:nil * Overview This is just studying for coding interviews. It loosely follows "Cracking the Coding Interview" by Gayle Laakmann McDowell. The code is structured by keeping the implementations in the =lib= directory and the study questions in the =tests= directory. The build system, =meson=, supports pulling down other projects and integrating them. CPPUTEST is pulled down with a wrap file. * Initialization ** Toolchain I use [[https://www.jetify.com/docs/devbox][=devbox=]] to handle the toolchain dependencies. If you have not installed it, I have found it best to first install Nix via the [[https://determinate.systems/posts/determinate-nix-installer/][Determinate Systems installer]] and then use the [[https://www.jetify.com/docs/devbox/installing_devbox/][Jetify Devbox installer]]: #+begin_src sh curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install curl -fsSL https://get.jetify.com/devbox | bash #+end_src After that just run the following in a shell from this directory: #+begin_src sh devbox shell #+end_src On the first run it will take a few minutes to install the required packages and their dependencies. On subsequent runs it should be pretty fast. ** The Build System (Meson) Initialize build directory and pull down the sub projects via the meson "wrap" feature: #+begin_src sh meson setup build #+end_src * Testing To run the tests: #+begin_src sh meson test -C build #+end_src