## Sort elements of an array in increasing order of absolute difference of adjacent elements

Given an array arr[], the task is to arrange the array in such a way that the absolute difference between the adjacent elements is in… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- Which Java libraries are useful for competitive programming?
- Minimize the maximum difference between adjacent elements in an array
- 7 Best Coding Challenge Websites in 2020
- Which Python Modules are useful for competitive programming?
- Speed up Code executions with help of Pragma in C/C++
- Basic Algorithm Techniques Not Taught in Academics
- Setting up a C++ Competitive Programming Environment
- Writing code faster during Competitive Programming in C++
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Count of subarrays of an Array having all unique digits
- Logarithm tricks for Competitive Programming
- Default values in a Map in C++ STL
- Move all zeroes to end of array using Two-Pointers
- Sum of GCD of all possible sequences
- How To Approach A Coding Problem ?
- Minimize the maximum difference of adjacent elements after at most K insertions
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Submatrix of given size with maximum 1's
- Kth most frequent Character in a given String
- Longest Mountain Subarray
- Length of the smallest substring which contains all vowels
- Find distance between two nodes in the given Binary tree for Q queries
- Count of substrings of length K with exactly K distinct characters
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum
- Find last remaining element after reducing the Array
- Queries for elements having values within the range A to B in the given index range using Segment Tree

Given an array arr[], the task is to arrange the array in such a way that the absolute difference between the adjacent elements is in… Read More »

Given a matrix of size N x M consisting of integers 1, 2, 3 and 4. Each value represents the possible movement from that cell:… Read More »

Given an array arr[] of some positive integers and missing occurrence of a specific integer represented by -1, the task is to find that missing… Read More »

Given two numbers, N and M, the task is to find two numbers made up of M as all its digits such that their difference… Read More »

Given an array arr[], the task is to count the number of times the minimum and the maximum value is updated during the traversal of… Read More »

Given two integers N and K, the task is to find K numbers(A1, A2, …, AK) such that ∑i=1KAi is equal to N and ∑i=1KAi2… Read More »

Given an array arr[] of N integers and an integer K, our task is to find the length of the longest subarray such that for… Read More »

Given an array arr[] and an integer K, the task is to find the number of merge operation required such that all the elements of… Read More »

Given a number N. The task is to group all the numbers from 1 to N such GCD of all the numbers in each group… Read More »

Given a string str, the task is to find the longest palindromic substring formed by the concatenation of the prefix and suffix of the given… Read More »

Given a number N, the task is to find the sum of all N-digit palindromic numbers which are divisible by 9 and the number doesn’t… Read More »

Given a directed graph with N nodes and E edges, a source S and a destination D nodes. The task is to find the path… Read More »

Given an integer array arr[] of size N and an integer X, the task is to find the longest sub-array where the absolute difference between… Read More »

Given a binary number in the form of a string, the task is to print a binary equivalent obtained by flipping only one contiguous set… Read More »

Given an integer N, the task is to create two sets of distinct elements from 1 to N such that the gcd of their respective… Read More »