LeetCode – Super Pow (Java)
Your task is to calculate ab mod 1337 where a is a positive integer and b is an extremely large positive integer given in the form of an array. Example1: a = 2 b = [3] Result: 8 Java Solution public int superPow(int a, int[] b) { int result=1; for(int i=0; i<b.length; i++){ result … Read more