## Data Type Ranges and their macros in C++

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 »

- Count common characters in two strings
- 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
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Find the minimum number of operations required to make all array elements equal
- Maximize the happiness of the groups on the Trip
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find the number of pair of Ideal nodes in a given tree
- 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
- Lexicographically Smallest Topological Ordering
- Lazy Propagation in Segment Tree | Set 2
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Replace array elements by sum of next two consecutive elements
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Check whether a number can be represented as sum of K distinct positive integers
- Find the number of divisors of all numbers in the range [1, n]
- Longest string in an array which matches with prefix of the given string

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 »

Programming is the process of developing and implementing sets of instructions to enable a computer to do a certain task.The programming contests like ACM… Read More »

This is a question asked quite often as in which language should be preferred to be efficient in competitive programming. It is something one should… Read More »

This is one of the most used techniques in competitive programming. Let us first consider below simple question. What is the minimum time complexity to… Read More »