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.
publicstaticintworkbook(intn,intk,List<Integer>arr){// Write your code hereintcount=0;intpageNo=1;for(inti=0;i<arr.size();i++){for(intj=0;j<arr.get(i);j++){if(j+1==pageNo){count++;}if((j+1)%k==0||j==arr.size()-1)pageNo++;}}returncount;}
Lisa's Workbook
You are viewing a single comment's thread. Return to all comments →
please debug my code