## Formatted output in Java

Sometimes in Competitive programming, it is essential to print the output in a given specified format. Most users are familiar with printf function in C.… 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
- Program to find the kth character after decrypting a string
- Maximize the happiness of the groups on the Trip
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find the minimum number of elements that should be removed to make an array good
- Find the number of pair of Ideal nodes in a given tree
- 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
- Number of ways of scoring R runs in B balls with at most W wickets
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Find the weight of the minimum spanning tree
- Count of integers in a range which have even number of odd digits and odd number of even digits

Sometimes in Competitive programming, it is essential to print the output in a given specified format. Most users are familiar with printf function in C.… Read More »

ACM ICPC(Association for Computing Machinery – International Collegiate Programming Contest) is a world-wide annual multi-tiered programming contest being organized for over thirteen years. The contest… Read More »

Google Asia Pacific University Test, also referred to as Google APAC, is perhaps the best opportunity for a student enrolled in higher education institutes in… Read More »

Prerequisites : BIT, DFS Given a rooted tree T, with ‘n’ nodes, each node has a color denoted by the array color[](color[i] denotes the color… Read More »

Generating Random Sorted Arrays We store the random array elements in an array and then sort it and print it. filter_none edit close play_arrow link… Read More »

Generating Random Directed Unweighted Graphs Since this is a graph, the test data generation plan doesn’t guarantee that a cycle gets formed or not. The… Read More »

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 »

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 »

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 »