Skip to content

Instantly share code, notes, and snippets.

View ffyuanda's full-sized avatar

Shaoxuan Yuan ffyuanda

View GitHub Profile
from socket import *
from urllib.parse import urlparse
INVALID_REQ = "Invalid request"
database = dict()
HOST = "localhost"
PORT = 4000
server_socket = socket(AF_INET, SOCK_STREAM)
import copy
import random
game_over = True
quit = False
board = [[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]
@ffyuanda
ffyuanda / grokking_to_leetcode.md
Created April 21, 2022 12:43 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@ffyuanda
ffyuanda / commands.txt
Last active October 5, 2021 10:56
Common commands
[top]
top -p `pgrep -d "," java`
[chmod/chown]
chown -R runoob:runoobgroup *
[docker]
sudo docker-compose up --force-recreate --build -d
sudo docker exec -it minecraft bash
sudo docker logs -f minecraft