Skip to content

Instantly share code, notes, and snippets.

@jaege
jaege / The Technical Interview Cheat Sheet.md
Last active September 7, 2018 20:08 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@jaege
jaege / test_override_final.cpp
Created February 25, 2016 12:29
Test key words override and final in virtual function declaration.
#include <iostream>
using std::cout; using std::endl;
struct B {
virtual void f1() { cout << "B::f1() "; }
virtual void f2() { cout << "B::f2() "; }
virtual void f3() { cout << "B::f3() "; }
virtual void f6() final { cout << "B::f6() "; }
void f7() { cout << "B::f7() "; }
void f8() { cout << "B::f8() "; }
@jaege
jaege / vimrc.vim
Created February 19, 2016 02:56
VIM autocmd to compile and run single source file.
if has("autocmd")
augroup vimrcCompileMap
" Remove ALL autocommands for the current group. This prevents having the
" autocommands defined twice (e.g., after sourcing the .vimrc file again).
autocmd!
" Map <F5> to save, compile and run single source file.
if has("win32")
autocmd FileType cpp nnoremap <buffer> <F5> :w<CR>:!cls && cl /EHsc % && %< <CR>
autocmd FileType python nnoremap <buffer> <F5> :w<CR>:!py % <CR>
@jaege
jaege / pip-upgrade-all.py
Created March 24, 2014 02:50
Upgrading all packages with pip
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)