Skip to content

A complete computer science study plan to become a software engineer.

License

Notifications You must be signed in to change notification settings

allgreed/coding-interview-university

Repository files navigation

Allgreed's Coding Interview University

Shoutout and disclaimer

  • This repo is a based on Jwasham's Coding Interview University
  • I implement everything in C, C++ and C++ with builtin-types
  • I've removed all the non-free links or those that I consider of little value

Prerequisites

Note: Those are only required to run my code, not to do the course

Google test

  • clone the repo
    sudo git clone https://github.com/google/googletest.git /opt/gtest
  • go into /opt/gtest/googletest/make
    cd /opt/gtest/googletest/make
  • test the Makefile
    sudo make
    sudo chmod +x sample1_unittest
    ./sample1_unittest
  • Gtest output should appear with tests passing, if so: you're all set!

Writing tests

  • copy Makefile to a new project
  • change locating variables, mine are:
    GTEST_DIR = /opt/gtest/googletest
    USER_DIR = .
  • test copied Makefile again with sample self-written test, example:
#include "gtest/gtest.h"

TEST(Confirming_setup_ok, dummy)
{
    // this should pass
}

TEST(Confirming_setup_ok, this_passes)
{
    EXPECT_EQ(2 + 2, 4);
}

TEST(Confirming_setup_ok, this_fails)
{
    EXPECT_TRUE(false);
}
  • incorporate [and refactor!] that Makefile into your flow

Valgrind

    sudo apt install valgrind

How to use it

  1. See Jwasham's repo for great non-technical content related to this course
  2. Fork this repo
  3. Clone the repo
  4. Undo all checks
  5. Code
  6. Code unit fingers burn and your veins pump raw binary
  7. Then code some more

Code -> ./code Chapter -> eg. data_structures Case -> inside a chapter -> eg. arrays

How to create new assignment

Go inside course directory

    cd code

Go inside chapter folder / create one

    cd [chapter_name_underscores_plural_lowercase] / mkdir [chapter_name_underscores_plural_lowercase]

Trigger script with assignment name

    ../../new_case.py [assignment_name_underscores_singular_lowercase]

About

A complete computer science study plan to become a software engineer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published