Preetika Prakashpreetikaprakash.hashnode.dev·Jun 28, 2023DSA Day 50/100Topic: Mathematical Questions Successfully Completed: 1 1) Addition under ModuloEasy Addition under Modulo public static long sumUnderModulo(long a, long b){ // ((a%g)+(b%g))%g long g = 1000000007; long q = a%g; l...Discuss100DaysOfCode
Preetika Prakashpreetikaprakash.hashnode.dev·May 24, 2023DSA Day 19/100Topic: Mathematical Questions Successfully Completed: 2 1) Absolute ValueEasy2) Factorial Of NumberEasy Absolute Value Time Complexity : O(1) Space Complexity : O(1) QuestionInput: I = -32 Output: 32 Explanation: The absolute value of -32 is 32. cl...Discuss100DaysOfCode