## Amazon Interview | Set 66 (For SDE)

A F2F 1. Min stack problem (algo+code) 2. filling next pointer in tree but in zig-zag order (algo+code) B Hiring manager 1. A big file… Read More »

## Analysis of Algorithm | Set 4 (Solving Recurrences)

In the previous post, we discussed analysis of loops. Many algorithms are recursive in nature. When we analyze them, we get a recurrence relation for time… Read More »

## Amazon Interview | Set 65 (Off-Campus for SDE-2)

My experience for Amazon’s Software Development Engineer-2 1st Round (Face-to-Face) 1. Design ATM 2. Design Car Service center —- Deep dive into design and focus… Read More »

## GATE | GATE CS 2008 | Question 47

We have a binary heap on n elements and wish to insert n more elements (not necessarily one after another) into this heap. The total… Read More »

## GATE | GATE CS 2008 | Question 46

You are given the postorder traversal, P, of a binary search tree on the n elements 1, 2, …, n. You have to determine the… Read More »

## GATE | GATE CS 2008 | Question 45

Dijkstra’s single source shortest path algorithm when run from vertex a in the below graph, computes the correct shortest path distance to (A) only vertex… Read More »

## GATE | GATE CS 2008 | Question 44

The subset-sum problem is defined as follows. Given a set of n positive integers, S = {a1 ,a2 ,a3 ,…,an} and positive integer W, is… Read More »

## GATE | GATE CS 2008 | Question 43

Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains… Read More »

## GATE | GATE CS 2008 | Question 85

G is a graph on n vertices and 2n – 2 edges. The edges of G can be partitioned into two edge-disjoint spanning trees. Which… Read More »

## GATE | GATE CS 2008 | Question 41

A B-tree of order 4 is built from scratch by 10 successive insertions. What is the maximum number of node splitting operations that may take… Read More »

## GATE | GATE CS 2008 | Question 40

The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is (A)… Read More »

## GATE | GATE CS 2008 | Question 39

Consider the following functions: f(n) = 2n g(n) = n! h(n) = nlogn Which of the following statements about the asymptotic behaviour of f(n), g(n),… Read More »

## GATE | GATE CS 2008 | Question 38

In an instruction execution pipeline, the earliest that the data TLB (Translation Lookaside Buffer) can be accessed is (A) before effective address calculation has started… Read More »

## GATE | GATE CS 2008 | Question 37

The use of multiple register windows with overlap causes a reduction in the number of memory accesses for I. Function locals and parameters II. Register… Read More »

## Amazon Interview | Set 64 (Off-Campus for SDE)

I am sharing my off campus SDE interview experience with Amazon. Online round: (1hr) Given coin array and a sum K, find min. number of… Read More »