Comment

Comment by graycat

Glanced at the exercises. It appears that two of them have numbers arranged in a triangle and ask for a longest path.

Hmm. Given such a triangle, let m be the largest number in the triangle. For each x in the triangle, replace it with m - x. For the resulting triangle, solve it to give the shortest path using one of the well known network shortest path algorithms.

parent graycat 11 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton