logoalt Hacker News

inigyoutoday at 1:36 AM1 replyview on HN

No, if it had one more 5 it would violate your specification that every time must occur exactly once.

Also, SORT(1,2,3,4) = 1,2,3,4,7


Replies

defrosttoday at 1:50 AM

Not my specification (drive by third party)

but I do take the view that ( 1, 2, 3, 4, 5, 5, 6 ) is a list of seven values (perhaps the number of dollars in the pockets of seven distinct unique people) and when sorted the output should also have seven items that correspond to the seven input items.

> Also ...

Yeah, that needs tightening up by pastel8739

show 2 replies