## Find the smallest twins in given range

Given a range [low..high], print the smallest twin numbers in given range (low and high inclusive). Two numbers are twins if they are primes and… Read More »

## Walmart Lab Interview Experience | Set 7 (Off-Campus 3 Years Experience)

Online round: [60 mins] 1. given a number N. print in how many ways it can be represented as N = a+b+c+d , 1< =a<… Read More »

## Walmart labs interview | Set 4 (For Senior Software Engineer)

I was interviewed for Senior Software Engineer position in Walmart (6-8 years of experience,even people with 4yrs exp were also shortlisted) Written Test (Hacker Earth)… Read More »

## Euler’s Totient Function

Euler’s Totient function ?(n) for an input n is count of numbers in {1, 2, 3, …, n} that are relatively prime to n, i.e.,… Read More »

## Efficient program to print all prime factors of a given number

Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then output… Read More »

## Java Program for efficiently print all prime factors of a given number

Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then output… Read More »

## C Program for efficiently print all prime factors of a given number

Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then output… Read More »

## Given a number, find the next smallest palindrome

Given a number, find the next smallest palindrome larger than this number. For example, if the input number is “2 3 5 4 5”, the… Read More »

## 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. Example: Input… Read More »