Skip to content

Instantly share code, notes, and snippets.

@StephanieMak
StephanieMak / The Technical Interview Cheat Sheet.md
Created January 22, 2019 23:55 — 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.
@StephanieMak
StephanieMak / .gitignore
Created April 11, 2017 15:03 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@StephanieMak
StephanieMak / BinaryHeap.java
Last active September 29, 2015 13:28 — forked from johntbates/BinaryHeap.java
Binary heaps - part two
package heap;
import java.util.ArrayList;
import java.util.Collection;
public abstract class BinaryHeap<T extends Comparable<T>> {
private ArrayList<T> theHeap;
private final int sign;
package net.fehmicansaglam.minheap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@SuppressWarnings("unused")
public class MinHeap<K, V extends Comparable<V>, T extends MinHeap.Item<K, V>> {
@StephanieMak
StephanieMak / gist:a729839cfd1ef8352c55
Last active September 17, 2015 00:31 — forked from evanp/gist:6456479
This is an example of using the JavaScript .dropdown("toggle") method in Bootstrap Because Bootstrap doesn't clear the "open" class on the dropdown parent, it stays open.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test dropdown toggle</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
</head>
<body>
<div class="dropdown">
@StephanieMak
StephanieMak / WordCount.java
Last active September 10, 2015 13:50 — forked from aajisaka/WordCount.java
WordCount v1.0 for MapReduce Tutorial
import java.io.IOException;
import java.util.StringTokenizer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
@StephanieMak
StephanieMak / WordCount2.java
Last active September 10, 2015 13:50 — forked from aajisaka/WordCount2.java
WordCount v2.0 for MapReduce Tutorial
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
@StephanieMak
StephanieMak / README.md
Last active September 8, 2015 23:12 — forked from akdh/README.md
Validation testing instructions for suggestion services.

Test your service

See https://github.com/akdh/cst-tools for JSON schemas.

Assuming your service callback URL is http://127.0.0.1:5002/suggestions, you can make a request to your service and ensure that it is valid using the following commands:

curl -H "Content-Type: application/json" --data @request.json -XPOST http://127.0.0.1:5002/suggestions > response.json
python validate.py data.json 192

No errors should be produced.

@StephanieMak
StephanieMak / gist:c1fbaa95b063b5edcd74
Last active August 29, 2015 14:27 — forked from mogutou1214/gist:6408080
Careercup 2.1 - Write code to remove duplicates from an unsorted linked list. FOLLOW UP How would you solve this problem if a temporary buffer is not allowed? Note: 1. pay special attention to deleting a node 2. learn to use "map" in C++ STL as a hash table
/*Remove duplicates from an unsorted linked list - cc2.1*/
void removeDuplicate1(node *head){
map<int,bool> table;
node *curr = head;
node *pre = NULL;
while(curr!=NULL){
/*delete the node if it already exists in the map*/
if(table[curr->data]){
pre->next = curr->next;
delete curr;
@StephanieMak
StephanieMak / C2P1.java
Last active August 29, 2015 14:27 — forked from spininertia/C2P1.java
Career Cup 2.1 Write code to remove duplicates from an unsorted linked list. FOLLOW UP How would you solve this problem if a temporary buffer is not allowed?
package chapter2;
import java.util.HashSet;
/*
* Career Cup 2.1
* Write code to remove duplicates from an unsorted linked list.
* FOLLOW UP
* How would you solve this problem if a temporary buffer is not allowed?
*/