Skip to content
Featured Articles
Questions based on various concepts of number theory and different types of number are quite frequently asked in programming contests. In this article, we discuss… Read More
Given two sorted arrays of size m and n of distinct elements. Given a value x. The problem is to count all pairs from both… Read More
Given an array of n distinct integers and an element x. Search the element x in the array using minimum number of comparisons. Any sort… Read More
We need to find number of possible pairs (a, b) such that GCD(a, b) is equal to given G and LCM (a, b) such that… Read More
Not using of 1LL or 1ll when needed // A program shows problem if we // don't use 1ll or 1LL #include <iostream> using namespace… Read More
Searching a graph is quite famous problem and have a lot of practical use. We have already discussed here how to search for a goal… Read More
Given a graph where every edge has weight as either 0 or 1. A source vertex is also given in the graph. Find the shortest… Read More
How to implement LRU caching scheme? What data structures should be used? We are given total possible page numbers that can be referred. We are also… Read More
  Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list… Read More