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

- Count common characters in two strings
- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Program to find the kth character after decrypting a string
- Find the minimum number of operations required to make all array elements equal
- Maximize the happiness of the groups on the Trip
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find the number of pair of Ideal nodes in a given tree
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Lexicographically Smallest Topological Ordering
- Lazy Propagation in Segment Tree | Set 2
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Replace array elements by sum of next two consecutive elements
- Number of ways of scoring R runs in B balls with at most W wickets
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Find the weight of the minimum spanning tree

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 »