## Find two co-prime integers such that the first divides A and the second divides B

Given two integers A and B, the task is to find two co-prime numbers C1 and C2 such that C1 divides A and C2 divides… Read More »

## Sum of all natural numbers from L to R ( for large values of L and R )

Given two very large numbers L and R where L ≤ R, the task is to compute the sum of all the natural numbers from… Read More »

## Interactive Problems in Competitive Programming | Set 2

Introduction to interactive problems in competitive programming is already discussed in the previous article. In this article, another problem based on the same concept is… Read More »

## Check if a cycle of length 3 exists or not in a graph that satisfy a given condition

Given an array Arr of N integers representing the nodes of a graph. The edges are defined between those pair whose bitwise AND is not… Read More »

## Reversing a Queue using another Queue

Given a queue. The task is to reverse the queue using another another empty queue. Examples: Input: queue[] = {1, 2, 3, 4, 5} Output:… Read More »

## Number of substrings that start with “geeks” and end with “for”

Given a string str consisting of lowercase English alphabets, the task is to find the count of substrings that start with “geeks” and end with… Read More »

## Minimize the sum of the array according the given condition

Given an array of integers A. The task is to minimise the sum of the elements of the array using the following rule: Choose two… Read More »

## Nth XOR Fibonacci number

Given three integers a, b and N where a and b are the first two terms of the XOR Fibonacci series and the task is… Read More »

## Java | Handling TLE While Using Arrays.sort() Function

In programming it is quite usual for a Java programmer to face time limit exceeded or TLE if they do not use Arrays.sort() function carefully.… Read More »

## Check which player visits more number of Nodes

Given a tree with N nodes. Two players A and B start from node 1 and node N respectively. A can visit all the adjacent… Read More »

## Why Should I Learn Coding?

Before we discuss this topic in detail we would like to know why you are reading this article. There might be a few reasons and… Read More »

## Count of integers in a range which have even number of odd digits and odd number of even digits

Given a range [L, R], the task is to count the numbers which have even number of odd digits and odd number of even digits.… Read More »

## Print all the permutation of length L using the elements of an array | Iterative

Given an array of unique elements, we have to find all the permutation of length L using the elements of the array. Repetition of elements… Read More »

## Convert an unbalanced bracket sequence to a balanced sequence

Given an unbalanced bracket sequence of ‘(‘ and ‘)’, convert it into a balanced sequence by adding the minimum number of ‘(‘ at the beginning… Read More »

## Print the path between any two nodes of a tree | DFS

Given a tree of distinct nodes N with N-1 edges and a pair of nodes P. The task is to find and print the path… Read More »