Wrong Java Editorial


#1

This is wrong:

if(b == 0){
	        return 1;
	    }

It should return 1%C in this case.


#2

1 % C is always 1. So why to perform unnecessary operation?


#3

@vikastaneja 1 % C is not always 1. Have you ever tried calculating 1%1 ?