Even your editorial solution is not correct


I’m sorry but this is totally not acceptable…
what you claim to be your fastest algorithm ( your editorial solution) is also not correct.

public int power(String A)
if(A.equals(“1”) || A.equals(“0”))
return 0;
int n=0;
for(int i=0;i<A.length();i++)
return 1;
return 0;

i/p: 604462909807314587353089
o/p: 1

well, the no is odd but your solution successfully proves it even as a power of 2.