Skip to content

Instantly share code, notes, and snippets.

@siddhantmedar
siddhantmedar / dsa_templates.py
Last active April 11, 2026 07:08
[DSA] Python Templates — Union Find, Tarjan SCC, Trie, Backtracking, Custom Comparators
# ============================================================
# 1. UNION FIND (Disjoint Set Union)
# ============================================================
# Use case: Connected components, cycle detection in graphs
# Example: Number of Islands (LC 200)
class UnionFind:
def __init__(self, elements):
self.parent = {e: e for e in elements}
self.size = {e: 1 for e in elements}
@siddhantmedar
siddhantmedar / GHOSTTY-SETUP.md
Created April 11, 2026 07:01
[Config] Ghostty Terminal — Ubuntu 24.04

Ghostty Terminal Setup

Installation

  • Installed natively via apt (not snap) for full feature support
  • PPA: ppa:mkasberg/ghostty-ubuntu
  • Updates automatically via sudo apt upgrade

Config Location

@siddhantmedar
siddhantmedar / gist:7539e0c9b986bdd4ddac274165042728
Created September 17, 2025 01:23
[Fix] VS Code 'code .' command not working — macOS Terminal
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"