1 December - Minimum number of jumps to reach end | Set 2 (O(n) solution). SO 2 December - find sum(S) of all contiguous sub-array's max difference, SO 3 December - The Enlightened Ones. HE 4 December - Minimize Cash Flow among a given set of friends who have borrowed money from each other. GFG… Continue reading December Problem Solving
Category: Random Problem
Prime
Sieve of Eratosthenes - Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. GFG Least prime factor of numbers till n - Given a number n, print least prime factors of all numbers from 1 to n. GFG Algo: Use Sieve of… Continue reading Prime
Important Questions | Mixed | 1
Check if two rectangles overlap - instead of checking if they overlap we check if a rectangle lies outside. So we check if a rectangle lies on the right,left, top or bottom of the first rectangle. If it lies outside then don't overlap. Else they overlap. SO Amazon: Count Negative Integers in Matrix - Numbers… Continue reading Important Questions | Mixed | 1