Skip to content

Instantly share code, notes, and snippets.

View kchia's full-sized avatar

Hou Chia kchia

View GitHub Profile
@kchia
kchia / nycda-july-17-projects.md
Last active January 10, 2018 01:25
NYCDA July'17 PTWDI Projects
@kchia
kchia / The Technical Interview Cheat Sheet.md
Created October 16, 2017 02:14 — 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.
@kchia
kchia / 0_reuse_code.js
Created May 25, 2016 18:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// sets up Board class for an n x n board, where n is the dimension
var Board = function(dimension, mines) {
this.board = [];
// place all mined cells into array first, followed by mine-less cells
this.plantMines(dimension,mines);
// perform an in-place shuffle to randomly place mines on board; see algorithm below
this.board = shuffle(this.board);
@kchia
kchia / realtyshares-minesweeper.js
Last active January 14, 2016 00:09
Creates a minesweeper board that has the ability to randomly plant mines on cells
// sets up Board class
var Board = function(dimension, mines) {
this.board = [];
for(var i = 0; i < dimension; i++) {
var row = [];
for(var j = 0; j < dimension; j++) {
row.push(new Cell(false));
}
this.board.push(row);
}