Skip to content

Instantly share code, notes, and snippets.

View ishashankkumar's full-sized avatar

Shashank Kumar ishashankkumar

View GitHub Profile
@RuolinZheng08
RuolinZheng08 / backtracking_template.py
Last active May 13, 2024 04:39
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())
@vasanthk
vasanthk / System Design.md
Last active May 25, 2024 07:39
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?