Problem Statement:
Your task is to calculate a^b mod 1337 where a is a positive integer and b is an extremely large positive integer given in the form of an array.
Example:a = 9 & b = [6,7,3,4]9^6734 -> The result will be too large.we are asked to give the result as (9^6734)37 which is equal to 1075.Table of ContentsProblem ExplanationModulo OperatorBruteForce Approach / Code / Time & Space ComplexityOptimise Approach / Code / Time & Space ComplexityProblem Explanation:
In this pro...
Published on October 09, 2022 15:02