## 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 »

- Program to find the Nth Prime Number
- Generate elements of the array following given conditions
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Check if each element of the given array is the product of exactly K prime numbers
- Find the sum of the ascii values of characters which are present at prime positions
- Check if the given string is vowel prime
- Find a sequence of N prime numbers whose sum is a composite number
- Generate N integers satisfying the given conditions
- Find out the prime numbers in the form of A+nB or B+nA
- Number of 0s and 1s at prime positions in the given array
- Find prime numbers in the first half and second half of an array
- Product of Primes of all Subsets
- Sum of numbers in a range [L, R] whose count of divisors is prime
- Minimum operations required to convert X to Y by multiplying X with the given co-primes
- Ramanujan Prime
- Sum of Semi-Prime Numbers less than or equal to N
- XOR of elements in an array having prime frequency
- Program to find the next prime number
- Triangle of numbers arising from Gilbreath's conjecture
- Queries for the difference between the count of composite and prime numbers in a given range
- Find the sum of prime numbers in the Kth array
- Find the prime P using given four integers
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Check if the first and last digit of number N is prime and their sum is less than K
- Find the XOR of first N Prime Numbers
- Bitwise AND of the sum of prime numbers and the sum of composite numbers in an array
- Sum of prime numbers without odd prime digits
- Absolute difference between the XOR of Non-Prime numbers and Prime numbers of an Array
- Partition first N natural number into two sets such that their sum is not coprime

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 count of numbers in {1, 2, 3, …, n} that are relatively prime to n, i.e.,… 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: Input… Read More »