Given a “m x n” matrix, count number of paths to reach bottom right from top left with maximum k turns allowed. What is a… Read More

All Medium Articles

Recently Microsoft visited our campus for IDC internship program and following is my interview experience. Online MCQ Round: It consist of 15 MCQ Questions on… Read More

Euler’s Totient function Φ(n) for an input n is count of numbers in {1, 2, 3, …, n} that are relatively prime to n, i.e.,… Read More

What is a Randomized Algorithm? An algorithm that uses random numbers to decide what to do next anywhere in its logic is called a Randomized… Read More

Puzzle: Given two hourglass of 4 minutes and 7 minutes, the task is to measure 9 minutes. Solution: At 0 minutes: Start both hourglasses at… Read More

Three Employees want to know the average of their salaries. They are not allowed to share their individual salaries. Answer: 1) X adds a Random… Read More

First round was technical aptitude. Total 65 students were eligible. 15 MCQs were asked- Everyone had different sets. All sorts of questions were asked, I… Read More

Introduction: I worked on Brain Computer Interface Technology under Cybersecurity at the University of North Texas for two months as my summer internship. We closely… Read More

The biggest problem that students face when they join big corporates is difficulty in writing high quality code that these corporates demand. The prime reason… Read More

Location: Gurgaon Round 1: Written Test 1. Find number of pairs with sum S in an array Sample input: [3,4,5,6,1,2] 3 Explanation: [{3,4},{6,1},{5,2}] 2. Move… Read More

Given two numbers n and k where n represents a number of elements in a set, find a number of ways to partition the set… Read More

Puzzle: How can you represent days of month using two 6 sided dice? You can write one number on each face of the dice from… Read More

Given a binary array and an integer m, find the position of zeroes flipping which creates maximum number of consecutive 1’s in array. Examples :… Read More

GATE CSE in Past GATE-CS-2015 (Set 1) GATE-CS-2015 (Set 2) GATE-CS-2015 (Set 3) GATE-CS-2014-(Set-1) GATE-CS-2014-(Set-2) GATE-CS-2014-(Set-3) GATE CS 2013 GATE CS 2012 GATE CS 2011… Read More

Given a set of n elements, find number of ways of partitioning it. Examples: Input: n = 2 Output: Number of ways = 2 Explanation: Let… Read More

A number is Sparse if there are no two adjacent 1s in its binary representation. For example 5 (binary representation: 101) is sparse, but 6… Read More

Given a character matrix where every cell has one of the following values. 'C' --> This cell has coin '#' --> This cell is a… Read More

Given an array of integers and a number k, write a function that returns true if given array can be divided into pairs such that… Read More

According to Wikipedia, in digital logic and computing, a Counter is a device which stores (and sometimes displays) the number of times a particular event… Read More

Pick the best statement for the below program: #include "stdio.h" int main() { union {int i1; int i2;} myVar = {.i2 =100}; printf("%d %d",myVar.i1,… Read More