DEV Community

Rattanak Chea
Rattanak Chea

Posted on

Coding Interview Q&A Project

One of my biggest challenges of doing a successful whiteboard coding interview is that I don't practice writing algorithms that are asked during interview (For example, reversing a LinkedList, checking if Binary Tree is balanced, etc..) on my day-to-day tasks. Just like other skills, if we are not practicing, they will get rusty.

Over the past several years, I have had several coding interviews. After each interview, regardless of the outcome, I wrote down the interview questions and practiced them again when I got a chance.

Therefore I made an open source Test-Driven project, Coding_Interview that is collection of common questions asked in interview. So far, I have some questions, answers, tests written in JavaScript, Python, and Java. This is on going project. More questions and answers are being added.

Some example questions include

  1. How do find common numbers between two arrays of numbers?
  2. Write a function to capitalize each word in a sentence except a, the, to, at, in, with, and but, or ?
  3. Write a function to check if a string is unique? (i.e no duplicate character)

project screenshot

Features

  • Code written in JavaScript, Python, Java
  • Testing with Mocha library, Unit Test for Python
  • Each question is accompanied by instruction and example
  • Organized and reusable code

How to run

  • Clone the repo, then npm install all dependencies
  • npm run test to run all test cases for JavaScript
  • npm run test-p to run Python test cases

How can you help

  • If you just want read more about it, please go to: Coding_Interview
  • If you would like to contribute, please submit a PR. I appreciate.

Latest comments (0)