MikeTrendsTrends right now

search

Hirschberg algorithm

Trends

  1. 1
    Solving the 0/1 knapsack problem with PyTorch●0/1 Knapsack Problem in PyTorch https://jedrzej.maczan.pl/2025_11_21_dp_knapsack_sliding_hirschberg # HackerNews # TechMmastodonTechnologySoftware24 d ago

    A new blog post by Jedrzej Maczan walks through implementing the classic 0/1 knapsack problem in PyTorch, using dynamic programming with a sliding window technique and the Hirschberg method to reduce memory usage. The piece shows how GPU-oriented tensor libraries can be applied to traditional algorithm problems, a pairing that has caught the attention of programmers online.