## Array algorithms in C++ STL (all_of, any_of, none_of, copy_n and iota)

From C++11 onwards, some new and interesting algorithms are added in STL of C++. These algorithms operate on an array and are useful in saving… Read More »

- 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
- What is Competitive Programming and How to Prepare for It?
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Maximize the happiness of the groups on the Trip
- Find the number of pair of Ideal nodes in a given tree
- Lexicographically Smallest Topological Ordering
- 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
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check whether a number can be represented as sum of K distinct positive integers
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Longest string in an array which matches with prefix of the given string
- Generate elements of the array following given conditions
- Make the list non-decreasing by changing only one digit of the elements
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Count of strings whose prefix match with the given string to a given length k
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Find the time which is palindromic and comes after the given time
- Find two vertices of an isosceles triangle in which there is rectangle with opposite corners (0, 0) and (X, Y)

From C++11 onwards, some new and interesting algorithms are added in STL of C++. These algorithms operate on an array and are useful in saving… Read More »

The test cases are extremely important part of any “Software/Project Testing Process”. Hence this Set will be very important for all the aspiring software developers.… Read More »

We have been trying to organize content of geeksforgeeks. We added below pages for this purpose. Algorithms and Data Structures: Algorithms Data Structures Languages: C… Read More »

Most of the times, in competitive programming, there is a need to assign the variable, the maximum or minimum value that data type can hold,… Read More »

For all those who aspire to excel in competitive programming, only having a knowledge about containers of STL is of less use till one is… Read More »

Standard C library provides qsort function that can be used for sorting an array. Following is the prototype of qsort() function. // Sort an array… Read More »

Regular competitive programmers face common challenge when input is large and the task of reading such an input from stdin might prove to be a… Read More »

Using Java in competitive programming is not something many people would suggest just because of its slow input and output, and well indeed it is… Read More »

Many programming contest problems are somehow related Prime Numbers. Either we are required to check Prime Numbers, or we are asked to perform certain functions… Read More »

It is recommended to refer Interesting facts about Bitwise Operators as a prerequisite. 1. How to set a bit in the number ‘num’ : If… Read More »

The most common tools to save time in C/C++ are typedefs and macros. Unfortunately, these features are not available in many other languages like Java.… Read More »

getchar_unlocked() is similar to getchar() with the exception that it is not thread safe. Below is an example code. filter_none edit close play_arrow link brightness_4… Read More »

This article helps to all those who want to begin with Competitive Programming. The only prerequisite one need is the knowledge of a programming language.… Read More »

Generating test cases for array programs can be a cumbersome process. But the generate and generate_n functions in the STL (Standard Template Library), come handy… Read More »

In competitive programming, it is important to read input as fast as possible so we save valuable time. You must have seen various problem statements… Read More »