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.
- Prepare
- Algorithms
- Implementation
- Drawing Book
- Discussions
Drawing Book
Drawing Book
Sort by
recency
|
2070 Discussions
|
Please Login in order to post a comment
What does that bolded part even mean?
1->2,3->4,5->6
**o. front flips-> ** * new page starting with even number : if p is even then p/2=front flips * if p is odd then p-1/2=front flips
** o. from back ->** * if page even: n-p/2=back flips * if page is odd: n-p-1/2=back flips
Here's the solution in python:
Here is my c++ solution, you can watch the explanation here : https://youtu.be/1T650YeAwRI
Intuative using loop