Last survivour | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Last survivour

You are given a string of letters and an array of numbers. The numbers indicate positions of letters that must be removed, in order, starting from the beginning of the array. After each removal the size of the string decreases (there is no empty space). Return the only letter left. Please explain. I don't understand

28th May 2021, 10:51 PM
Ailana
Ailana - avatar
1 Answer
+ 2
Last survivour no i am the first survivor! // ⬜⬜⬜⬜⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬛⬜⬛⬜⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬛⬜⬛⬛⬜ ⬜⬛⬜⬛⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬜⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬛⬛⬛⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬛⬜⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ IS REQUIRED
29th May 2021, 3:34 AM
NEZ
NEZ - avatar