Skip to content

Instantly share code, notes, and snippets.

View vaibhav-walia's full-sized avatar

Vaibhav Walia vaibhav-walia

  • Amazon, Carnegie Mellon University, SAP Labs
  • Seattle, WA
View GitHub Profile
@vaibhav-walia
vaibhav-walia / docker-cheat-sheat.md
Created February 14, 2019 17:19 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

apt update
#install curl
apt install -y curl
#install a few prerequisite packages which let apt use packages over HTTPS
sudo apt install apt-transport-https ca-certificates curl software-properties-common
#add the GPG key for the official Docker repository
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@vaibhav-walia
vaibhav-walia / The Technical Interview Cheat Sheet.md
Created September 15, 2018 20:56 — 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.
#include <iostream>
#include <string.h>
using namespace std;
int t;//number of test cases
int price[100000][3]={0};
int cache[100000][3]={-1};
int n;
unsigned int costOfBuying(int fromShop, int item){
//if buying from last shop, return total price