Given a string with a number for example: 0100243170112001410001
Task: seperate the string into blocks of 2 and 4 characters. Your blocks shouldnt start with 0 unless its not possible to do it different.
Example output (more possible solutions):
0100-2431-70-11-200-14-100-01
Note: spliting the beginning into 2char blocks could be needet to make it work at the end of the string.
How would you solve this anon?
Also Lf for simular problems on sites like leetcode...
Task: seperate the string into blocks of 2 and 4 characters. Your blocks shouldnt start with 0 unless its not possible to do it different.
Example output (more possible solutions):
0100-2431-70-11-200-14-100-01
Note: spliting the beginning into 2char blocks could be needet to make it work at the end of the string.
How would you solve this anon?
Also Lf for simular problems on sites like leetcode...
