Given a, b and N(1 to 106). Task is to count the numbers formed by digits a and b exactly of a length N such… Read More »

Given two integers L and R. Find the number of perfect powers in the given range [L, R]. A number x is said to be… Read More »

Given a number N, task is to Check whether it is a permutable prime number or not. A Permutable prime number is that number which… Read More »

Given a set S of N numbers and a range specified by two numbers L (Lower Bound) and R (Upper Bound). Find the number of… Read More »

Consider the following C program. Output : 100 25700 We can easily guess that the output for ‘d’ is 100 as 100 is ASCII value… Read More »

Given N pieces of chessboard all being ‘white’ and a number of queries Q. There are two types of queries : Update : Given indices… Read More »

Given a number n, the task is to find the largest perfect cube that can be formed by deleting minimum digits(possibly 0) from the number.… Read More »

Given a string s of length n, count the number of substrings having different types of palindromic characteristics. Palindromic Characteristic is the number of k-palindromes… Read More »

Given a string of brackets, task is to find the number of pairs of brackets involved in a balanced sequence in a given range. Examples… Read More »

Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of… Read More »

Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have… Read More »

Given two sorted arrays, a[] and b[], task is to find the median of these sorted arrays, in O(log(min(n, m)), when n is the number… Read More »

Differences between MongoDB and MySQL on various parameters are discussed below: What are MongoDB and MySQL? MongoDB MySQL MongoDB is an open-source database developed by… Read More »

Round 1: Validate an infix arithmetic expression string (braces and brackets are similar to parentheses): (1+2)*{[90*3]-[67+8-9]} Proposed Ans: Djikstra’s Shunting yard Interviewer’s Ans: Parser Tree… Read More »

Given an undirected graph, task is to find the minimum number of weakly connected nodes after converting this graph into directed one. Weakly Connected Nodes… Read More »

A Levelwise OR/XOR alternating segment tree is a segment tree, such that at every level the operations OR and XOR alternate. In other words at… Read More »

Ruby is a pure Object-Oriented language developed by Yukihiro Matsumoto (also known as Matz in the Ruby community) in the mid 1990’s in Japan. Everything… Read More »

Given a number N, and Q queries of two types 1 and 2. Task is to write a code for the given query where, in… Read More »

Given an integer N which shows the size of the string and in the next line given a string which contain string of character with… Read More »

Given an equation of the circle X2 + Y2 = R2 whose center at origin (0, 0) and the radius is R. The task is… Read More »