Better HN
topnewbestaskshowjobs
Log inSign up

two-star

22 karma · joined Apr 12, 2024 (2y ago) · 2 submissions

Submissions

comment 2y ago · link · parent

Without that rule, you could decompose everything into 1's, and then recompose from there. Not the most efficient solution, but a boring one that always exists.

comment 2y ago · link · parent

Hi. I'm the post's author. This was something I dashed off quickly, so I was a bit imprecise in the language. Clarifications:

Only positive integers are meant to be allowed. (Zero excluded.)

Combining is meant to work on adjacent pairs of integers.

If this is used in coding interviews, I deny any responsibility. Unless it's used in interviewing me, in which case I will totally take credit.