Question Set 3
This is question set 3. Another day another set.Happy Coding! "Talk is Cheap Just code it" Problem 1-Kadane's Algorithm(Easy) Given an integer array , find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. SAMPLE INPUT -2 1 -3 4 -1 2 1 -5 4 SAMPLE OUTPUT 6 [4+(-1)+2+1] Link to the question- https://leetcode.com/problems/maximum-subarray/ Problem 2-GCD(Easy) GCD (Greatest Common Divisor) or HCF (Highest Common Factor) of two numbers is the largest number that divides both of them.Find the GCD of two numbers. PS-Try to learn Euclid method of calculating GCD SAMPLE INPUT a=96 b=56 SAMPLE OUTPUT 14 Link to the question- https://www.geeksforgeeks.org/c-program-find-gcd-hcf-two-numbers/ Problem 3-GCD of Array(Easy) Given an array of numbers, find GCD of the array elements. SAMPLE INPUT 2 4 6 8 SAMPLE OUTPUT 2 ...