Given a number S. Check whether it is divisble by 11 or not.
S = 76945
Explanation: The number is divisible by 11
as 76945 % 11 = 0.
S = 12
Explanation: The number is not divisible
by 11 as 12 % 11 = 1.
You don't need to read input or print anything. Your task is to complete the function divisibleBy11() which takes the number in the form of string S as input and returns 1 if the number is divisible by 11. Else, it returns 0.
Expected Time Complexity: O(Log S) where S is the input number. Expected Auxiliary Space: O(1).