Find sum of a number and its maximum prime factor
Given an integer N, the task is to find the sum of N and it’s maximum prime factor. Examples: Input: 19 Output: 38 Maximum prime… Read More »
Given an integer N, the task is to find the sum of N and it’s maximum prime factor. Examples: Input: 19 Output: 38 Maximum prime… Read More »
Given an integer N, the task is to find the greatest number less than N such that the sum of its digits is greater than… Read More »
Given two positive integers L and R, the task is to count the elements from the range [L, R] whose prime factors are only 2… Read More »
Flag variable is used as a signal in programming to let the program know that a certain condition has met. It usually acts as a… Read More »
Given a number N, the task is to find the required numbers consist of only 0 and 1 digit whose sum is equal to N.… Read More »
Given an array where elements in small range. The maximum element in the array does not go beyond size of array. Find frequencies of elements.… Read More »
Given an array arr, the task is to find the minimum sum of the elements of the array after applying the following operation: For any… Read More »
Given a 2-D Matrix and an integer ‘K’, the task is to predict the matrix after ‘K’ iterations given as follows: An element 1 in… Read More »
Given a number N(>=3). The task is to find the three integers (<=N) such that LCM of these three integers is maximum. Examples: Input: N… Read More »
Given an integer N, the task is to count the number of triplets (a, b, c) such that a2 + b2 = c2 and 1… Read More »
Given an integer K and an array arr each of whose element x represents a square with two of its vertices as (0, 0) and… Read More »
Given an integer K and a string str of lowercase English characters, the task is to find a string s such that when s is… Read More »
Given a string. The task is to find the maximum occurred substring with a maximum length. These occurrences can overlap. Examples: Input: str = “abab”… Read More »
Given an integer N, the task is to find the sum of the digits of the number N written in all the bases from 2… Read More »
Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »