## Sort prime numbers of an array in descending order

Given an array of integers ‘arr’, the task is to sort all the prime numbers from the array in descending order in their relative positions… Read More »

- What is Competitive Programming and How to Prepare for It?
- Why Should I Learn Coding?
- Check which player visits more number of Nodes
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Make the list non-decreasing by changing only one digit of the elements
- Print the path between any two nodes of a tree | DFS
- Convert an unbalanced bracket sequence to a balanced sequence
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Print all the permutation of length L using the elements of an array | Iterative
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Print nodes having maximum and minimum degrees
- Color all boxes in line such that every M consecutive boxes are unique
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )
- Largest sub-matrix with all equal elements
- Minimize the cost of partitioning an array into K groups
- Maximum length sub-array which satisfies the given conditions
- Find out the prime numbers in the form of A+nB or B+nA

Given an array of integers ‘arr’, the task is to sort all the prime numbers from the array in descending order in their relative positions… Read More »

Given a string consisting of only 0’s and 1’s. Now you are given N non-intersecting ranges L, R ( L <= R), more specifically [L1,… Read More »

Given an array of elements ‘arr’, the task is to maximise the sum of the elements of this array after performing the following operation: You… Read More »

Given an array ‘arr’, the task is to find all possible integers each of which is the bitwise AND of at least one non-empty sub-array… Read More »

Given integers ‘K’ and ‘N’, the task is to find the Nth term of the K-Fibonacci series. In K – Fibonacci series, the first ‘K’… Read More »

Given a string ‘str’, the task is to find whether the vowels in the string are in alphabetical order or not. The string contains only… Read More »

Given a string ‘str’ and an integer ‘k’, the task is to count the number of sub-strings of length ‘k’ which are comprised of the… Read More »

Given an array of integers and an integer ‘k’, the task is to find the largest element from the array that is repeated exactly ‘k’… Read More »

Given a string ‘str’, the task is to remove all the characters from the string that have even frequencies. Examples: Input: str = “aabbbddeeecc” Output:… Read More »

Given a number N(1<=N<=109), the task is to find the total number of integers less than equal to n which have exactly 9 divisors. Examples:… Read More »

Given a number N, find the first triangular number whose number of divisors exceeds N. Triangular numbers are sums of natural numbers, i. e., of… Read More »

Given a string ‘s’, the task is to find if the characters of the string are in alphabetical order. The string contains only lowercase characters.… Read More »

Given two arrays A and B of same size m. You have to find the sum of nth terms of Fibonacci like series (value of… Read More »

Pre-Requisites: Depth First Search | Parent Array Representation Given a parent array representation of a binary tree, we need to find the number of Isosceles… Read More »

Given ‘n’ pair of points, the task is to find four points such that they form a square whose sides are parallel to x and… Read More »