# Tag Archives: Prime Number

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
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
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 Φ (n) for an input n is the count of numbers in {1, 2, 3, …, n-1} that are relatively prime to… Read More
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 n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then the… Read More
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 larger than this number. For example, if the input number is “2 3 5 4 5”, the… Read More
Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number.  Example: … Read More