## Sort the numbers according to their sum of digits

Given an array arr[] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples: Input: arr[] =… Read More »

- Sort elements by frequency | Set 5 (using Java Map)
- Lower and Upper Bound Theory
- Applications of Hashing
- Code Optimization Technique (logical AND and logical OR)
- Largest perfect square number in an Array
- Jump Pointer Algorithm
- Difference between Deterministic and Non-deterministic Algorithms
- Algorithms | Recurrences | Set 1
- Difference between Recursion and Iteration
- Check whether bitwise OR of N numbers is Even or Odd
- Find the repeating and the missing number using two equations
- Minimum operations of the given type required to make a complete graph
- Greatest divisor which divides all natural number in range [L, R]
- Count pairs (i,j) such that (i+j) is divisible by A and B both
- Count all Prime Length Palindromic Substrings
- Probability of getting two consecutive heads after choosing a random coin among two different types of coins
- Python Code for time Complexity plot of Heap Sort
- Maximum number of parallelograms that can be made using the given length of line segments
- Choose points from two ranges such that no point lies in both the ranges
- Sort the numbers according to their sum of digits

Given an array arr[] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples: Input: arr[] =… Read More »

Given two segments [L1, R1] and [L2, R2], the task is to choose two elements x and y from both the ranges (one from range… Read More »

Given a string str, the task is to count all the sub-strings of str which are palindromes and their length is prime. Examples: Input: str… Read More »

Given N vertex where N is even. Initially there is no edge between any of the vertices. You are allowed to perform operation as illustrated… Read More »

Logical AND (&&) While using && (logical AND), we must put the condition first whose probability of getting false is high so that compiler doesn’t… Read More »

Given two integers L and R, the task is to find the greatest divisor that divides all the natural numbers in the range [L, R].… Read More »

Given an array arr[] of size N, each integer from the range [1, N] appears exactly once except A which appears twice and B which… Read More »

Question 1: Which of the following is the value of T3(n) where T3(n) is defined as T3(n) = 5*T3(n-1) – 4*T3(n-2) C1*5n + C2*4n C1… Read More »

A program is called recursive when an entity calls itself. A program is call iterative when there is a loop (or repetition). Example: Program to… Read More »

Given an array of n integers. The task is to find the largest number which is a perfect square. Print -1 if there is no… Read More »

Given N line segments where the length of the ith line segment is . The task is to find the maximum number of parallelograms can… Read More »

Given two coins which have probability of getting heads p% and q% respectively, the task is to determine the probability of getting two consecutive heads… Read More »

Given an array arr[] containing N numbers. The task is to check whether the bitwise-OR of the given N numbers is even or odd. Examples:… Read More »

The Jump pointer algorithm is a design technique for parallel algorithms that operate on pointer structures, such as arrays or linked list. This algorithm is… Read More »

Given n, m, A and B. The task is to count the number of pairs of integers (x, y) such that 1 x n and… Read More »