Tag Archives: Amazon

Given two polynomial numbers represented by a linked list. Write a function that add these lists means add the coefficients who have same variable powers.… Read More »

Amazon Interview experience | Set 325

1st Round(Hackerrank) Given an array, find largest sum of 1) Contiguous subarray 2) Non Contiguous Subarray Largest region of cells problem 2nd Round(Written test) Add… Read More »

Minimum steps to reach target by a Knight | Set 1

Given a square chessboard of N x N size, the position of Knight and position of a target is given. We need to find out… Read More »

Printing brackets in Matrix Chain Multiplication Problem

Prerequisite : Dynamic Programming | Set 8 (Matrix Chain Multiplication) Given a sequence of matrices, find the most efficient way to multiply these matrices together.… Read More »

Boggle | Set 2 (Using Trie)

Given a dictionary, a method to do a lookup in the dictionary and a M x N board where every cell has one character. Find… Read More »

Possible to form a triangle from array values

Given an array of integers, we need to find out whether it is possible to construct at least one non-degenerate triangle using array values as… Read More »

Amazon Interview experience | Set 324 (For SDE2)

I got a call from an consultant for recruitment drive in Delhi. First round (1 hour 30 minutes): online writtenIt was online written round on… Read More »

Print a Binary Tree in Vertical Order | Set 3 (Using Level Order Traversal)

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

Print all k-sum paths in a binary tree

A binary tree and a number k are given. Print every path in the tree with sum of the nodes in the path as k.… Read More »

Amazon Interview Experience | Set 323 (Software Development Engineer – Off-Campus)

I applied off campus for the role of Software Development Engineer at Amazon, Hyderabad. Round 1 (Telephonic) : 1 hour Interview began with my intro… Read More »

Amazon Interview Experience | Set 322 (Off-Campus)

Recently I attended interview at Amazon for SDE 1 profile. Round 1 (Written): 3 questions were given and I was asked to write the executable… Read More »

Find all elements in array which have at-least two greater elements

Given an array of n distinct elements, the task is to find all elements in array which have at-least two greater elements than themselves. Examples… Read More »

Probability of Knight to remain in the chessboard

Given an NxN chessboard and a Knight at position (x,y). The Knight has to take exactly K steps, where at each step it chooses any… Read More »

Choose k array elements such that difference of maximum and minimum is minimized

Given an array of n integers and a positive number k. We are allowed to take any k integers from the given array. The task… Read More »

Unbounded Knapsack (Repetition of items allowed)

Given a knapsack weight W and a set of n items with certain value vali and weight wti, we need to calculate minimum amount that… Read More »