Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
While this outputs an integer with the correct sequence of 1's and 0's, it's still converting the output of bin to an integer, which is returning a value in a base 10 system. If you were to set n = 2 and subtract 2 from your output, you would get 8, not 0.
When my code gets long I get the hint that I'm doing something wrong, but I went with it so I could solve the logic. Now that I sovled it and I see this solution, I just have to laugh at myself haha
Awesome approach