Self Dividing Numbers
A number is known as a self dividing numbers if – 1. Mod of every digit of number with number is zero. 2. The number should contain all non zero digits. For instance – 128 128 % 1 = 0, 128 % 2 = 0, 128 % 8 = 0 …
A number is known as a self dividing numbers if – 1. Mod of every digit of number with number is zero. 2. The number should contain all non zero digits. For instance – 128 128 % 1 = 0, 128 % 2 = 0, 128 % 8 = 0 …
Fibonacci numbers are the numbers that form the series called Fibonacci series and are represented as Fn. The first two Fibonacci numbers are 0 and 1 respectively i.e. F0=0 and F1=1. Starting from the third Fibonacci number each Fibonacci number is the sum of its previous two numbers in the …
The positive numbers whose only prime factors are 2, 3, or 5 are known as ugly numbers. For eg- 8 is an ugly number because it’s an only prime factor is 2 but 7 is not an ugly number because it’s a prime factor is 7. 1 being an exception …
Problem Statement In the “Minimum number of Merge Operations to make an Array Palindrome” problem we have given an array “a[]”. Find the minimum number of merge_operations are required to make an array palindrome. Note, A palindrome is a word, phrase, or sequence that reads the same backward as forwards. …
Problem Statement In the “Print all Possible Combinations of R Elements in a given Array of size N” problem, we have given an array of size n. Find all combinations of size r in the array. Input Format Th first and only one line containing an integer N. Second-line containing …
Problem Statement In count possible triangles problem we have given an array of n positive integers. Find the number of triangles that can be formed using three different elements of the array as the sides of a triangle. Note: The condition of the triangle is the sum of two sides …
Problem Statement In the “Find Smallest Missing Number in a Sorted Array” problem we have given an integer array. Find the smallest missing number in N sized sorted array having unique elements in the range of 0 to M-1, where M>N. Example Input [0, 1, 2, 3, 4, 6, 7, …