## First occurrence of a digit in a given fraction

Given three integers a, b and c, find the first occurrence of c in a/b after the decimal point. If it does not exists, print… Read More »

- What is Competitive Programming and How to Prepare for It?
- Make the list non-decreasing by changing only one digit of the elements
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Print nodes having maximum and minimum degrees
- Color all boxes in line such that every M consecutive boxes are unique
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )
- Largest sub-matrix with all equal elements
- Minimize the cost of partitioning an array into K groups
- Maximum length sub-array which satisfies the given conditions
- Find out the prime numbers in the form of A+nB or B+nA
- Check if the Matrix satisfies the given conditions
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Count of Multiples of A ,B or C less than or equal to N
- Sort elements by modulo with K
- time.h localtime() function in C with Examples
- Interactive Problems in Competitive Programming | Set 2

Given three integers a, b and c, find the first occurrence of c in a/b after the decimal point. If it does not exists, print… Read More »

Given n number of cashiers exchanging the money. At the moment, cashier had number of people in front of him. The person in the line… Read More »

There are several primality test available to check whether the number is prime or not like Fermat’s Theorem, Miller-Rabin Primality test and alot more. But… Read More »

Given is an array of n non-negative integers. The operation is to insert a number in the array which is strictly greater than current sum… Read More »

We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint… Read More »

Prerequisites: Sprague Gruncy theorem Grundy Numbers Nim is a famous game in which two players take turns removing items from distinct piles. During each turn,… Read More »

Rachel is submitting assignment from every student. She has given them a few minutes to arrange their assignments before submission. Just then Rahul remembers that… Read More »

Given the sum and xor of two numbers X and Y s.t. sum and xor , we need to find the numbers minimizing the value… Read More »

Pablo has square chocolate Box of size n x n in which a variety of healthy chocolates are present denoted by ‘H’ initially but he… Read More »

Given a positive integer, find the largest number that could be generated by swapping only two digits at most once. Examples: Input: 2736 Output :… Read More »

Given a string s, print all possible subsequences of the given string in an iterative manner. We have already discussed Recursive method to print all… Read More »

A STL based simple implementation of BFS using queue and vector in STL. The adjacency list is represented using vectors of vector. In BFS, we… Read More »

Prerequisites : Bitwise operators in C, Bitwise Hacks for Competitive Programming, Bit Tricks for Competitive Programming Compute XOR from 1 to n (direct method) :… Read More »

When it comes to Product Based Companies, they need good coders and one needs to clear the Competitive Coding round in order to reach the… Read More »

Python is one such programming language which makes everything easier and straight forward. Anyone who has dabbled in python for Competitive Coding gets somewhat addicted… Read More »