---
title: "Discussion on \"LeetCode 1049 – Last Stone Weight II\" | Hashnode"
description: "Discussion on \"LeetCode 1049 – Last Stone Weight II\". A complete debug log for LeetCode 1049: how to transform the stone-smashing game into a 0-1 knapsack and optimize it to 1D DP."
url: "https://hashnode.com/posts/leetcode-1049-last-stone-weight-ii/692e8c021f5b78feae751759"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode 1049 – Last Stone Weight II](https://leetlog-by-chao.hashnode.dev/leetcode-1049-last-stone-weight-ii?utm_source=hashnode&utm_medium=feed)

A complete debug log for LeetCode 1049: how to transform the stone-smashing game into a 0-1 knapsack and optimize it to 1D DP.

Dec 2, 2025 · 3 min read · leetlog-by-chao.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#dynamic-programming](https://hashnode.com/tag/dynamic-programming)
-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#knapsack](https://hashnode.com/tag/knapsack)
-   [#java](https://hashnode.com/tag/java)

## Written by

[CHAO DU](https://hashnode.com/@chaos789)

@chaos789

  
[View profile](https://hashnode.com/@chaos789)

Greetings

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
