Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am trying to wrap my head around Simon's algorithm and I am trying to solve a question.
This is the solution that I have come up with. Please correct me if I am wrong.