All Medium Articles

## GATE | GATE-CS-2014-(Set-2) | Question 65 3

A 4-way set-associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is… Read More »

## GATE | GATE-CS-2014-(Set-2) | Question 65 3

(A) 3.464 (B) 3.932 (C) 4.000 (D) 4.444 Answer: (C) Explanation: let x = the given expression. Now squaring both sides. (x)^2 = 12 +… Read More »

## GATE | GATE-CS-2014-(Set-1) | Question 65 3

Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2… Read More »

## GATE | GATE-CS-2014-(Set-1) | Question 65 3

Four fair six-sided dice are rolled. The probability that the sum being 22 is X/1296. The value of X is ________ (A) 7 (B) 8… Read More »

## Expedia Interview for SDE-II 3

I attended Expedia interview for SDE-II role. Here are the questions on each round. Round 1: [Coding] 1. Given MxN matrix with sorted elements row… Read More »

## GATE | GATE-CS-2014-(Set-1) | Question 65 3

Which of the regular expressions given below represent the following DFA? I) 0*1(1+00*1)* II) 0*1*1+11*0*1 III) (0+1)*1 (A) I and II only (B) I and… Read More »

## GATE | GATE-CS-2014-(Set-1) | Question 22 3

Consider the directed graph given below. Which one of the following is TRUE? (A) The graph doesn’t have any topological ordering (B) Both PQRS and… Read More »

## How to dynamically allocate a 2D array in C? 3.5

Following are different ways to create a 2D array on heap (or dynamically allocate a 2D array). In the following examples, we have considered ‘r‘… Read More »

## Kth smallest element in a row-wise and column-wise sorted 2D array | Set 1 3.8

Given an n x n matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the given 2D… Read More »

## Convert a floating point number to string in C 3.4

Write a C function ftoa() that converts a given floating-point number or a double to a string. Use of standard library functions for direct conversion… Read More »

## Suffix Array | Set 2 (nLogn Algorithm) 3.8

A suffix array is a sorted array of all suffixes of a given string. The definition is similar to Suffix Tree which is compressed trie… Read More »

## Amazon Interview | Set 77 (Off-Campus For SDE-1 / 1.5yrs experienced) 3.5

Amazon SDE1 Off campus Written Round 1. Given an array in which elements are first increasing and then decreasing. find the maximum element in the… Read More »

## Find if there is a subarray with 0 sum 3

Given an array of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum. Examples : Input: {4,… Read More »

## Amazon Interview | Set 75 (For SDE-1) 3

I am currently in my 8th semester . I recently attended the off campus drive for SDE1 at Amazon. Here’s my journey. Round 1:- (Written)… Read More »

## Divide and Conquer | Set 5 (Strassen’s Matrix Multiplication) 3.4

Given two square matrices A and B of size n x n each, find their multiplication matrix. Naive Method Following is a simple way to… Read More »

## Count all possible groups of size 2 or 3 that have sum as multiple of 3 3.1

Given an unsorted integer (positive values only) array of size ‘n’, we can form a group of two or three, the group should be such… Read More »

## Amazon Interview | Set 71 (For SDE-2) 3.5

Recruitment Drive – Delhi (22 March 2014) Position SDE-2 1st Round – Coding and Algo (50 Minutes) 1. Find In order predecessor in BST. 2.… Read More »

## Print a Binary Tree in Vertical Order | Set 1 3

Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5… Read More »

## Adobe Interview | Set 8 (Off-Campus) 3

Experience : 8 months First Round : Held on interview street .Aptitude + technical (standard pattern and questions) Second Round (f2f): Started of with the… Read More »

## Amazon Interview | Set 70 (On-Campus For Internship) 3.7

Online Round Coding Question: Given a float number 7.64, convert it into the string WITHOUT using any inbuilt function/library. for eg: input float no.: 7.64… Read More »