Skip to content

Instantly share code, notes, and snippets.

View brendoncheung's full-sized avatar
🎯
Focusing

Aleph brendoncheung

🎯
Focusing
View GitHub Profile
func addTwo(numberA: Int, numberB: Int) -> Int {
return numberA + numberB
}
@brendoncheung
brendoncheung / The Technical Interview Cheat Sheet.md
Created February 6, 2018 19:05 — 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.
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetrofitClient {
private static Retrofit retrofit = null;
public static Retrofit getClient(String baseUrl) {
if (retrofit==null) {
retrofit = new Retrofit.Builder()
@brendoncheung
brendoncheung / runnable.java
Last active May 21, 2019 16:59
Runnable interface
public interface Runnable {
void run();
}
@brendoncheung
brendoncheung / thread.java
Created May 21, 2019 17:00
All 8 constructors in the thread class
Thread(); //1
Thread(Runnable target); //2
Thread(Runnable target, String name); //3
Thread(String name); //4
Thread(ThreadGroup group, String name); //5
Thread(ThreadGroup group, Runnable target); //6
Thread(ThreadGroup group, Runnable target, String name); //7
Thread(ThreadGroup group, Runnable target, String name, long stackSize); //8 WARNING!
public static void main(String[] args) {
Thread t1 = new Thread();
}
public static void main (String[] args) {
Thread t = new Thread()
}
public static void main (String[] args) {
Thread t1 = new Thread();
t1.start();
}
public static void main (String[] args) {
Thread t1 = new Thread();
t1.start();
}
public static void main (String[] args) {
Thread t1 = new Thread();
t1.start();
}