Image designed by macrovector / Freepik
Credit to @JMP for contributing this challenge idea! (Which we slightly modified.)
In this challenge, we will sort some numbers onto a 6x6 square grid. Each cell will have one number.
Your challenge is to place all the integers into the grid such that
Each row is descendingly sorted (ties are not allowed). For example: 6 5 4 3 2 1 is valid but 6 5 5 5 3 2 is not valid.
Each column is descendingly sorted (ties are not allowed)
or declare this impossible.
Example on a 3x3 grid: Given these numbers to sort [95, 75, 75, 74, 74, 74, 54, 45, 40]
A valid response would be [[95, 75, 74], [75, 74, 54], [74, 45, 40]]
In the attached file, we have 100 sets of 36 random integers. The integers are between 0 and 99. For each set, return either a valid sorting on a 6x6 grid or declare it impossible.
Please also return the total count of cases for which the sorting was impossible.
Rules:
All correct responses will be designated as winners
Challenge deadline is December 3, 2025
Please include your code as well as a small description of your approach and anything interesting you encountered
Your entry is not permitted to be written by AI. For any feedback on this Challenge, please head over to the Meta post.
Have fun and thanks for participating!

Here is mine answer using python (.py)