Skip to content

Instantly share code, notes, and snippets.

View anirudh-chhangani's full-sized avatar
🏠
Working from home

Anirudh Chhangani anirudh-chhangani

🏠
Working from home
View GitHub Profile
@anirudh-chhangani
anirudh-chhangani / gist:9989292
Last active April 1, 2018 07:49
Reformatted Tiny 2048.c
M[16],X=16,W,k;
main(){
T(system("stty cbreak"));
puts(W&1?"WIN":"LOSE");
}
K[]={2,3,1};
s(f,d,i,j,l,P){
@anirudh-chhangani
anirudh-chhangani / engine.c
Created September 21, 2018 18:58 — forked from druska/engine.c
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
@anirudh-chhangani
anirudh-chhangani / setup.sh
Last active May 19, 2019 07:25
ubuntu-setup
sudo apt update -y
sudo apt upgrade -y
sudo apt install htop curl python3 -y
sudo apt install python3-pip -y
curl https://sh.rustup.rs -sSf | sh
sudo apt install build-essential -y
sudo apt install gdb -y
sudo apt install cmake -y
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
@anirudh-chhangani
anirudh-chhangani / main.go
Created May 19, 2019 17:29
tabular struct
package main
import (
"bytes"
"fmt"
"github.com/fatih/structs"
"github.com/olekukonko/tablewriter"
)
type printable struct {