Skip to content

Instantly share code, notes, and snippets.

View noel-friedrich's full-sized avatar
🚂
Hopefully on a train somewhere

Noel Friedrich noel-friedrich

🚂
Hopefully on a train somewhere
View GitHub Profile
@noel-friedrich
noel-friedrich / stamp_folding_naive.py
Created May 16, 2025 07:34
a stupid implementation for the stamp folding problem. It's quite inefficient but works!
from enum import Enum
import copy
class FoldDirection(Enum):
Right = "r"
Left = "l"
class FoldingPaper:
def __init__(self, num_segments, perm_arr=None):