[Community Puzzle] Number Partition

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Jsw7524,validated by @_vcxl,@Neckers and @texus.
If you have any issues, feel free to ping them.

Wiki defines lexicographical order as lexical order, or dictionary order, which is a generalization of the alphabetical order

According to this definition and the reverse sort requirement in the problem,
if string1 is “10” and string2 is “2 2”
they should be sorted as:

2 2
10

because ‘2’ precedes ‘1’.

Correct?

1 Like

Thanks for your thoughtful question!

There are likely better alternative words to represent the desired order in the question instead of reverse lexicographic order.

For the sake of rigor, n temporarily restricts to less than 10 for now. It is welcome for anyone to submit a better statement that can accurately represent required order in the question.