All Medium Articles
Given an integer n, calculate the square of a number without using *, / and pow().  Examples :  Input: n = 5 Output: 25 Input:… Read More
Given a n by n board where n is of form 2k where k >= 1 (Basically n is a power of 2 with minimum… Read More
There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find… Read More
First Round 1. There were 5 Programming Questions and the test was conducted on HackerRank. 2. I solved 3 out of them. Mostly the questions… Read More
Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You… Read More
A vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’… Read More
In C, we can specify size (in bits) of structure and union members. The idea is to use memory efficiently when we know that the… Read More
Alok has three daughters. His friend Shyam wants to know the ages of his daughters. Alok gives him first hint.  1) The product of their… Read More
Given a rectangular matrix which has only two possible values ‘X’ and ‘O’. The values ‘X’ always appear in form of rectangular islands and these… Read More
Given an array of size n where all elements are distinct and in range from 0 to n-1, change contents of arr[] so that arr[i]… Read More
Hi everyone, Recently i had wonderful interview experience with Sap Labs India. I would like to share the interview experience with all the readers and… Read More
Recently Microsoft visited our campus for SDE intern. The process took over 4 months. Round 1 (Online MCQ’s) time- 30 minutes. This was conducted on… Read More
Consider the following C program: # include <stdio.h> int main( ) {    int i, j, k = 0;    j = 2 * 3 / 4… Read More
In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the network which can be assigned to a host is… Read More
Suppose Xi for i = 1, 2, 3 are independent and identically distributed random variables whose probability mass functions are Pr[Xi = 0] = Pr[Xi… Read More
Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates… Read More
Two processes X and Y need to access a critical section. Consider the following synchronization construct used by both the processes. Here, varP and varQ… Read More
The equality above remains correct if X is replace by (A) Only I (B) Only II (C) I or III or IV but not II… Read More
Consider a typical disk that rotates at 15000 rotations per minute (RPM) and has a transfer rate of 50 × 106 bytes/sec. If the average… Read More
A half adder is implemented with XOR and AND gates. A full adder is implemented with two half adders and one OR gate. The propagation… Read More