0
How could characters be arranged so that it will match separate lines? (python)
For example if given 7123724271379220 output must be something like this 7123 7927 3022 1724 any spiral or zikzak form as long as identical characters line up and the original sequence remain adjacent to each other. And how could code be written to ensure the most lined op characters.
2 Respuestas
+ 2
Put the series into a set pattern and count how many matches you get, repeat this for every pattern you support. Pick the one that has the highest match count and print it.
0
create a 2D array, fill it in the desired order and then print it