Skip to content

Instantly share code, notes, and snippets.

@MarlevPy
MarlevPy / greedy_cutting.py
Created August 5, 2019 07:06
Greedy 1D Cutting Optimization Algorithm - Developed when I needed to cut some wood planks for the new railing in the appartment I was building.
from dataclasses import dataclass
from typing import List
from warnings import warn
from collections import Counter
from prettytable import PrettyTable
@dataclass
class CutPiece: