# Category Archives: Competitive Programming

## Test Case Generation | Set 2 ( Random Characters, Strings and Arrays of Random Strings)

Set 1 (Random Numbers, Arrays and Matrices) Generating Random Characters filter_none edit close play_arrow link brightness_4 code // A C++ Program to generate test cases… Read More »

## 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 »

## Test Case Generation | Set 1 (Random Numbers, Arrays and Matrices)

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 »

## How to read content of GeeksforGeeks in an organized way?

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 »

## 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 »

## Algorithm Library | C++ Magicians STL Algorithm

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 »

## C qsort() vs C++ sort()

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 »

## Cin-Cout vs Scanf-Printf

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 »

## Fast I/O in Java in Competitive Programming

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 »

## Quick ways to check for Prime and find next Prime in Java

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 »

## Bitwise Hacks for Competitive Programming

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 »

## Some important shortcuts in Competitive Programming

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() – faster input in C/C++ for Competitive Programming

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 »

## A Better Way To Approach Competitive Programming

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 (generate() and generate_n() in C++)

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 »