/ctci

My answers/notes to real company code challenge problems and "Cracking the Coding Interview" by Gayle McDowell. Join our Sunday study group on Zoom.

Primary LanguageJavaScript

Answers/Notes to Cracking the Coding Interview, 6th Ed.

To join our Slack CTCI study group, give me your email, install Zoom, and create a Zoom account. Join Slack after I invite you by email. Then I'll add you to our private Slack channel.

We meet 11 am-1 pm PST on Zoom each Sunday. Please pay me $1 before each meeting, on Venmo (https://venmo.com/Raymond-Gan-1) or PayPal (rayning@yahoo.com, use "send to a friend" to avoid a fee). I'll add you to the meeting after you've paid.


See all my LeetCode solutions. My Codility solutions. My Project Euler solutions. My HackerRank solutions.

In January 2020, we began solving the 150 coding questions from this course: Grokking the Coding Interview, as I explain here and here. Buy the course for $79 to see it all. It's optional to buy the course. See all my coding answers for it.


See our YouTube channel for video of our group meetings. I don't update this much. You should come to our meetings.

See my 2.5 hour YouTube video interview: How to be competitive for software jobs, which covers my 5 LinkedIn articles for bootcamp grads.

This group codes through company code challenge problems and all 189 coding interview questions in Gayle McDowell's book "Cracking the Coding Interview" together. We’ll try to solve 1+ company code challenge per meeting. To post code challenges for our group to solve, put them in our private Zoom Slack channel. Use any computer language you wish.

Gayle McDowell's crowdsourced CTCI solutions, by programming language.

Most software engineers study this book to interview at FAANG companies: Facebook, Apple, Amazon, Netflix, Google, Microsoft, etc.

I made these Slack channels for us. Please join them all:

CTCI's official Facebook group.

CTCI's official Slack group.

VS Code is my code editor. I installed its Java Extension Pack.

I cloned Gayle's GitHub solutions and opened the /Java folder in VS Code. It instantly told me what to install and let me start running/debugging code with breakpoints, with NO configuration! Super easy.


If you forked this GitHub repo to your laptop, here's how to easily keep your fork up to date with mine as I add new code:

In directory of your /ctci folder in the terminal, type:

  1. git remote add upstream git@github.com:rayning0/ctci.git

  2. git fetch upstream

  3. git pull upstream master

  4. git push -f

Line 1 adds a remote repo called "upstream" to your fork, pointing to my GitHub repo.

Lines 2-4 update what "upstream" means, pulls the latest code from my /ctci repo, then force pushes it up to YOUR repo.

Since I'm don't want to type all these lines, I added these lines to my .bash_profile:

function grau { # update fork (part 1)
  git remote add upstream $1
}

function gupdate { # update fork (part 2)
  git fetch upstream
  git pull upstream master
  git push -f
}

You only need to type grau git@github.com:rayning0/ctci.git once.

In the future, as I add new code to my /ctci repo, you just cd to YOUR /ctci fork of mine and type gupdate. It will automatically pull my latest code.

If you don't have a .bash_profile, create this file in your home directory. After editing it, run the file by doing source ~/.bash_profile.

By Raymond Gan