We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Most of the solutions here have oversimplified one fact that if the number of book pages are even for example n is 8 and the user wants to turn to an odd page (For example, take p = 5), their solutions will break because they have hardcoded to return 1. I am sharing my solution in C#:
Drawing Book
You are viewing a single comment's thread. Return to all comments →
Most of the solutions here have oversimplified one fact that if the number of book pages are even for example n is 8 and the user wants to turn to an odd page (For example, take p = 5), their solutions will break because they have hardcoded to return 1. I am sharing my solution in C#: