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

All Medium Articles

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

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

Consider a simple checkpointing protocol and the following set of operations in the log. (start, T4); (write, T4, y, 2, 3); (start, T1); (commit, T4);… Read More

I recently had an interview with Compro Technologies, Delhi based firm, for Associate Software Developer. http://www.comprotechnologies.com/#home The process took 4 rounds .(via TalentGrids) 1) Online… Read More

Consider the C program below. #include <stdio.h> int *A, stkTop; int stkFunc (int opcode, int val) { static int size=0, stkTop=0; switch (opcode) { case… Read More

Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which… Read More