## Sum of elements in an array having prime frequency

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 »

- How can one become good at Data structures and Algorithms easily?
- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Some useful C++ tricks for beginners in Competitive Programming
- Check if a number is perfect square without finding square root
- Sum of XOR of all subarrays
- Sort the array of strings according to alphabetical order defined by another string
- Make Binary Search Tree
- Sum of similarities of string with all of its suffixes
- Check if it is possible to reach a number by making jumps of two given length
- Smallest Pair Sum in an array
- Find the number in a range having maximum product of the digits
- Maximum of all Subarrays of size k using set in C++ STL
- Print matrix in snake pattern from the last column
- Count distinct substrings that contain some characters at most k times
- Number of array elements derivable from D after performing certain operations
- Operations required to make the string empty
- Program to find the kth character after decrypting a string
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Minimum number of sets with numbers less than Y
- Find two numbers whose divisors are given in a random order
- Count common characters in two strings
- Sum of the multiples of two numbers below N
- Number of subarrays have bitwise OR >= K
- Given two arrays count all pairs whose sum is an odd number
- Sum of bitwise AND of all subarrays
- Use of FLAG in programming
- Maximum length substring with highest frequency in a string
- Interactive Problems in Competitive Programming
- Shortest Path using Meet In The Middle

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 »

Given two integers N and K, the task is to generate a permutation of N numbers (Every number from 1 to N occurs exactly once)… Read More »

Given three integer K, L and R (range [L, R]), the task is to find the minimum number of elements the range must be extended… Read More »

Given three integers N, A and B, the task is to find whether N can be represented as sum of A’s and B’s. Examples: Input:… Read More »

Given three integers N, A and B, the task is to find whether N is divisible by any number that contains only A and B… Read More »

Given an array of N elements, the task is to convert it into a permutation (Each number from 1 to N occurs exactly once) by… Read More »

Given a string ( containing characters from ‘0’ to ‘9’) and two digits and . The task is to find the substring in the given… Read More »

Given two integers N and M, partiton N into M integers such that the difference between the maximum and minimum integer obtained by the partition… Read More »

Given four integers sourceX, sourceY, destinationX and destinationY which represent the source and destination coordinates on a chessboard. The task is to find the minimum… Read More »

Given an array of distinct elements, the task is to find the total number of two element pairs from the array whose sum is a… Read More »

Given an even number N. The task is to consider numbers from 1 to N2, split them into N groups of the equal sum. Examples:… Read More »

Given a string str containing only lowercase English alphabets, the task is to find the sum and product of all the prime frequencies of the… Read More »

Given two integers and and an array arr[] every element of which at index is calculated as arr[i] = i * (-1)i. The task is… Read More »

Given an N-ary tree, print the number of leaf nodes in the subtree of every node. Examples: Input: 1 / \ 2 3 / |… Read More »

Given an array of integers. The task is to sort the given array on the basis increasing count of distinct prime factors. Examples: Input :… Read More »