You are viewing a single comment's thread. Return to all comments →
My solution in C:
int pageCount(int n, int p) { int total_page = n/2; int start = 1; // start page int flip = 0; while(start < p){ start += 2; flip ++; } return flip < (total_page-flip) ? flip: (total_page-flip); }
Seems like cookies are disabled on this browser, please enable them to open this website
Drawing Book
You are viewing a single comment's thread. Return to all comments →
My solution in C: