Find the Longest Path
Why Hacker News recommends it
HN shares it as a fun, memorable way to explain the longest path problem and as an entry in lists of programming and math songs.
What it is
Find the Longest Path is a comedic song by Daniel J. Barrett, a Billy Joel parody that describes the NP-hard longest path problem in informal terms.
Recommended by 1 HN commenters across 1 different months, 2021 to 2026.
What Hacker News said
Recommends wpasc · 2021-07 · on “Akamai Edge DNS was down”
Haha please do, a video would be great. Your song reminded me of the song: "Find the Longest Path" which you may get a kick out of: [this video]
Cites seniorsassycat · 2021-11 · on “White Collar Holler – Stan Rogers”
Stan Rogers has a knack for writing songs that sound older than himself, this song shows he doesn't need nautical themes to do it. Some other programming and math songs Kill -9 [LINK] Find the longest path [this video]
Cites saghm · 2026-05 · on “SingleRide: Longest route on NYC Subway without visiting the same station twice”
Finding the longest path in a graph is itself a pretty well-described NP-complete problem: [LINK] Alternately, you can listen to a Billy Joel parody that describes the problem in decidedly less academic terms: [this video]