## Count digits in a factorial | Set 2

Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) =… Read More »

## Count digits in a factorial | Set 1

Given an integer n, find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4……..*n and factorial(0) =… Read More »

## Different ways for Integer to String Conversions In Java

Convert using Integer.toString(int) The Integer class has a static method that returns a String object representing the specified int parameter. Syntax : public static String… Read More »

## Forward List in C++ | Set 1 (Introduction and Important Functions)

Forward list in STL implements singly linked list. Introduced from C++11, forward list are useful than other containers in insertion, removal and moving operations (like… Read More »

## Remove duplicates from an array of small primes

Given an array of primes such that the range of primes is small. Remove duplicates from the array. Examples: Input: arr[] = {3, 5, 7,… Read More »

## Bind function and placeholders in C++

Sometimes we need to manipulate the operation of a function according to the need, i.e changing some arguments to default etc. Predefining a function to… Read More »

## Code to generate the map of India (with explanation)

Given a obfuscated code that generates the map of India, explain its working. The following code when executed generates the map of India – #include… Read More »

## Test Case Generation | Set 3 (Unweighted and Weighted Trees)

Generating Random Unweighted Trees Since this is a tree,  the test data generation plan is such that no cycle gets formed. The number of edges… Read More »

## System.exit() in Java

The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code. A non-zero value of status code is… Read More »

## Array class in C++

The introduction of array class from C++11 has offered a better alternative for C-style arrays. The advantages of array class over C-style array are :-… Read More »

## Find Surpasser Count of each element in array

A surpasser of an element of an array is a greater element to its right, therefore x[j] is a surpasser of x[i] if i <… Read More »

## Converting string to number and vice-versa in C++

In general or more specifically in competitive programming there are many instances where we need to convert a number to a string or string to… Read More »

## Tuples in C++

What is a tuple? A tuple is an object that can hold a number of elements. The elements can be of different data types. The… Read More »

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

## How to write Regular Expressions?

A regular expression (sometimes called a rational expression) is a sequence of characters that define a search pattern, mainly for use in pattern matching with… Read More »