0
Word Rank Code Coach Help
It seems I don't understand the question because I don't get how Case 1's rank is "13" instead of "2". So I'd like some help or hints on how to format my code properly. https://sololearn.com/compiler-playground/clRkJBWVSidp/?ref=app
1 Resposta
+ 3
Ikenna Onwuka ,
here are the task steps: (maybe this can help you understand the task)
> take an input as string like "ABAB"
> create all combinations of the input by avoiding duplicates! store items in an array / list
like: ['ABAB', 'BBAA', 'BABA', 'ABBA', 'BAAB', 'AABB']
> sort these elements
like: ['AABB', 'ABAB', 'ABBA', 'BAAB', 'BABA', 'BBAA']
> now find the position of the input string in the sorted array / list
> result is found in the second position.