frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Dynamic programming bursting balloons

https://sylhare.github.io/2025/07/29/bursting-balloons.html
13•ingve•2d ago

Comments

jasonpeacock•10h ago
Am I completely misunderstanding the problem, or is the math in the example solution wrong?

    Bursting 1 first gives you 3×1×5=15 coins. <-- OK...
    Bursting 3 first gives you 1×3×1=1 coins. (using left virtual balloon) <-- Should be 3?
    A possibility would be bursting 1, then 5, then 3, which gives you a total of 3×1×5+3×5×1+1×3×1=33 coins. <-- Should be 3x1x5+1x5x1+1x3x1=24?
mauricioc•10h ago
If you have "3 1 5" and you burst 1, you gain 3x1x5 points and the state becomes "3 5", with the two remaining balloons being adjacent to each other.

The "1x3x1=1" part for the earlier example is a typo indeed, it should be 3.

Jtsummers•10h ago
The first error seems to be a transcription error, it's correct in their graph representation further down.

The second one isn't an error, but a poor explanation. After a balloon is burst, the balloons now have new neighbors. That is, it isn't this:

  3 1 5 -> pop 1 = 15
  3 _ 5 -> pop 3 = 3
It's:

  3 1 5 -> pop 1 = 15
  3 5   -> pop 3 = 15
The distance between the balloons doesn't make them not neighbors.
SJC_Hacker•9h ago
This is fairly old Leetcode problem (who probably got it from somewhere else)

https://leetcode.com/problems/burst-balloons/description/

Its tricky and if I got this problem in a tech interview, I would be hard-pressed to solve it in 45 minutes if I hadn't seen it before

dastbe•7h ago
yeah, i would expect a candidate who hasn’t seen it before to have at best a 50/50 shot of realizing that the traversal is “in reverse” so to speak, and need a hint to move forward.

though once you know that i’d expect a candidate to bang it out fairly quickly. it’s not that many lines of code.

dastbe•7h ago
this would really be helped by demonstrating the wrong way to solve this, which is trying to think of the first balloon in the range and then combine with the subproblems. i expect this to be where people who know about dp are most likely to get hung up, and may not realize they can think about it the opposite way.

Ladybird Browser July Update

https://ladybird.org/newsletter/2025-07-31/
25•net01•1h ago•0 comments

Cerebras Code

https://www.cerebras.ai/blog/introducing-cerebras-code
290•d3vr•9h ago•119 comments

Hardening mode for the compiler

https://discourse.llvm.org/t/rfc-hardening-mode-for-the-compiler/87660
83•vitaut•5h ago•10 comments

Coffeematic PC – A coffee maker computer that pumps hot coffee to the CPU

https://www.dougmacdowell.com/coffeematic-pc.html
175•dougdude3339•9h ago•40 comments

Weather Model based on ADS-B

https://obrhubr.org/adsb-weather-model
149•surprisetalk•2d ago•24 comments

JavaScript retro sound effects generator

https://github.grumdrig.com/jsfxr/
57•selvan•3d ago•12 comments

Robert Wilson has died

https://www.theartnewspaper.com/2025/08/01/robert-wilson-playwright-director-artist-obituary
44•paulpauper•4h ago•11 comments

At 17, Hannah Cairo solved a major math mystery

https://www.quantamagazine.org/at-17-hannah-cairo-solved-a-major-math-mystery-20250801/
298•baruchel•15h ago•133 comments

Ethersync: Peer-to-peer collaborative editing of local text files

https://github.com/ethersync/ethersync
109•blinry•3d ago•19 comments

I couldn't submit a PR, so I got hired and fixed it myself

https://www.skeptrune.com/posts/doing-the-little-things/
241•skeptrune•14h ago•139 comments

The Rickover Corpus: A digital archive of Admiral Rickover's speeches and memos

https://rickovercorpus.org/
46•stmw•6h ago•10 comments

Ask HN: Who is hiring? (August 2025)

180•whoishiring•16h ago•212 comments

Native Sparse Attention

https://aclanthology.org/2025.acl-long.1126/
109•CalmStorm•11h ago•15 comments

Yearly Organiser

https://neatnik.net/calendar/
20•anewhnaccount2•3d ago•8 comments

Does the Bitter Lesson Have Limits?

https://www.dbreunig.com/2025/08/01/does-the-bitter-lesson-have-limits.html
127•dbreunig•11h ago•63 comments

Why leather is best motorbike protection – whilst being dragged along concrete

https://www.youtube.com/watch?v=xwuRUcAGIEU
13•lifeisstillgood•1d ago•0 comments

Researchers map where solar energy delivers the biggest climate payoff

https://www.rutgers.edu/news/researchers-map-where-solar-energy-delivers-biggest-climate-payoff
89•rbanffy•11h ago•46 comments

Anthropic revokes OpenAI's access to Claude

https://www.wired.com/story/anthropic-revokes-openais-access-to-claude/
205•minimaxir•9h ago•66 comments

Launch HN: Societies.io (YC W25) – AI simulations of your target audience

92•p-sharpe•19h ago•49 comments

Show HN: Draw a fish and watch it swim with the others

https://drawafish.com
837•hallak•4d ago•216 comments

Sources of Truth

https://cutlefish.substack.com/p/tbm-369-sources-of-truth
6•kiyanwang•3d ago•0 comments

The tradeoff between human and AI context

https://softwaredoug.com/blog/2025/07/30/layers-of-ai-coding
16•softwaredoug•2d ago•0 comments

Replacing tmux in my dev workflow

https://bower.sh/you-might-not-need-tmux
263•elashri•22h ago•291 comments

Ergonomic keyboarding with the Svalboard: a half-year retrospective

https://twey.io/hci/svalboard/
96•Twey•15h ago•51 comments

Ask HN: Who wants to be hired? (August 2025)

79•whoishiring•16h ago•191 comments

Make Your Own Backup System – Part 2: Forging the FreeBSD Backup Stronghold

https://it-notes.dragas.net/2025/07/29/make-your-own-backup-system-part-2-forging-the-freebsd-backup-stronghold/
102•todsacerdoti•4d ago•4 comments

Our Farewell from Google Play

https://secuso.aifb.kit.edu/english/2809.php
261•shakna•22h ago•107 comments

Google shifts goo.gl policy: Inactive links deactivated, active links preserved

https://blog.google/technology/developers/googl-link-shortening-update/
219•shuuji3•14h ago•158 comments

Twentyseven 1.0

https://blog.poisson.chat/posts/2025-08-01-twentyseven.html
32•082349872349872•9h ago•3 comments

Self-Signed JWTs

https://www.selfref.com/self-signed-jwts
101•danscan•13h ago•63 comments