Maybe I am making this too complicated but I think I need to start reading a string from the right to find its position.
Here is my sample:
10000000000000000101
In this string I need to find all the ‘1’ and get the position that they are on.
In this case it would be 1,3 and 19.
Is that an easy way to do this?
Thank you all.
1 Answer