Program to Find Square Root of an Integer Using Binary Search

This article will discuss how to find the square root of an integer efficiently using Binary Search. If the number is a perfect square, the program should return the square root, else return the floor of the square root of the number. Before that we first discuss the naive approach to find the square root …

Read moreProgram to Find Square Root of an Integer Using Binary Search

Program to Find all Factors of a Number

In this article we will discuss three methods to Find All the Factors of a given Number. The codes provided will be in Python, but same logic can be used to implement in any other language as well. Iterative Program to Find All Factors of a Number This method uses modulus operation(%) to Find All …

Read moreProgram to Find all Factors of a Number

Sieve of Eratosthenes

The name seems to be threatening right? On the contrary, Sieve of Eratosthenes is a technique developed by one of the brilliant Greek Mathematicians, Eratosthenes, to eliminate complex looping multiplications or divisions. This algorithm removes all the numbers that do not meet a specific criterion, hence works like a sieve. This is one of the …

Read moreSieve of Eratosthenes