Generate Pythagorean Triples Given an integer limit, generate all Pythagorean Triples with values smaller than limit. Interview Questions, Mathematics
Minimum Moves to Equal Array Elements – LeetCode Solution [Medium] When we increment n – 1 elements, the relative difference between the highest number and all other numbers effectively decreases by 1. Arrays, Competitive Programming, Mathematics
Modular Multiplicative Inverse and Modular Combinatorics (nCr % prime) in C++ In mathematics, particularly in the area of arithmetic, a modular multiplicative inverse of an integer a is an integer x such that the product ax is congruent to 1 with respect to the modulus m. Competitive Programming, Mathematics
How to find k nearest neighbours of a given point from a set of points in a plane? Let’s given n points in a plane. We’ve to find k nearest neighbours of a given point ‘p’ from the given n points. Heaps, Mathematics