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.
/*
I have solved the question in JAVA but I am getting only 8% at the end.Please Can anyone help me to how to improve this code to get 80+ percentage ?
My code is.
*/
public static int pageCount(int n, int p) {
// Write your code here
int left=p/2;
int right=n/2-left;
int count=(left >= right)? right:left;
return count;
}
Cookie support is required to access HackerRank
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 →
/* I have solved the question in JAVA but I am getting only 8% at the end.Please Can anyone help me to how to improve this code to get 80+ percentage ? My code is. */