Given N numbers and Q queries, every query consists of L and R, task is to find the number of such integers i (L<=i<R) such… Read More »

#
All Medium Articles

Given an algebraic expression of the form (x1 + x2 + x3 + . . . + xn) * (y1 + y2 + . .… Read More »

We have seen so far what a React web-app is, the states and lifecycle of a React component. We also created a basic clock using… Read More »

Let the page fault service time be 10 ms in a computer with average memory access time being 20 ns. If one page fault is… Read More »

Which of the following storage classes have global visibility in C/C++ ? (A) Auto (B) Extern (C) Static (D) Register Answer: (B) Explanation: Extern storage… Read More »

Given two numbers N and M. Find the number of ways in which factorial N can be expressed as a sum of two or more… Read More »

Given N containers consisting of N copies of number A and N copies of number B. We need to arrange the numbers in the N… Read More »

The entire world is now surrounded by billions and trillions of mobile Tech which is inevitable. The major share of the development of mobile apps… Read More »

I got contacted by a recruiter agency. 1st Round (HackerRank Test 1 Hour 30 Mins): 1) http://gdevtest.geeksforgeeks.org/print-number-ascending-order-contains-1-2-3-digits/ 2) 2. Given a sequence of M and… Read More »

Given a stream of integers, lookup the rank of a given integer x. Rank of an integer in stream is “Total number of elements less… Read More »

You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and… Read More »

Place the numbers 1, 2, 3, 4, 5, 6, 7, 8 into the eight circles in the figure given below, in such a way that… Read More »

Given two arrays X[] and Y[] with n-elements, where (Xi, Yi) represent a point on coordinate system, find the smallest rectangle such that all points… Read More »

Below given are some methods which can be used to convert Stream to Set in Java. Method 1 : Using Collectors Stream collect() method takes… Read More »

You are given a string s(only lowercase alphabets) with length n. Print the position of every character of the String it must acquire so that… Read More »

Given an array of N integers, using ‘+’ and ‘-‘ between the elements check if there is a way to form a sequence of numbers… Read More »

Given an array of positive numbers and a number k, find the number of subarrays having product exactly equal to k. We may assume that… Read More »

Given a tree with N nodes and N-1 edges, find out the maximum height of tree when any node in the tree is considered as… Read More »

For given any unsigned int n find the final value of ∑(i*j) where (1<=i<=n) and (i <= j <= n). Examples: Input : n =… Read More »

Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack.… Read More »