Topic — Add New » Posts Last Poster Freshness
Amazon online written test @ DCE 1 mukuljain.dtu 1 day

1. Write a function isValid(int sudoko[][]) to chec whether a given sudoko solution is valid or not.

2. You are given a paragraph in which the length of all the words in a line has following properties:
odd position words are in increasing order of their length
even position words are in decreasing order of their length
you are given a word, you have to write a code to search it in the given paragraph and return the line
number.

Amazon Interview Question for Software Engineer/Developer (0 - 2 Years) 6 PsychoCoder 5 days

The next highest number in the given sequence
ex: input:213476-->213467
54321--> -1

Amazon
Amazon Interview Questions about Designing System 2 vikram.kuruguntla 6 days

Customers want to buy some products but the products are out of stock, design a system to notify them when those products are again available.

Design, display a customer's friends list who also bought the product he is curently looking at.

Design a DVD rental system.

Largest Binary Search Tree in a given Binary Tree 8 aayush kumar 2 weeks

Given a binary tree, find the largest binary SEARCH tree in this binary tree.

When I mean largest, the tree with maximum number of nodes. And the binary search tree should be a sub-tree in the given binary tree.

Note: Not every binary tree is a binary search tree

Amazon selection process 5 telia sonera 3 weeks

Hi.
Can somebody please share his/her experience of the amazon SDE-1 selection process?

I have cleared the online coding round. But what next is expected ? ...

Largest monotonically increasing sequence in an array 6 gvk 3 weeks

Write code for finding length of largest monotonically increasing sequence in an array of integers. Optimize it (not the usual O(n) in worst case, but a better approach in average case).

Find 0 sum elements in three Linked lists 9 gvk 3 weeks

Given three lists: A, B and C of length n each. Write a function which returns true if any 3 three numbers (1 from each list), sum up to zero. Else return false, if there is no such combination.

First repeating element 4 gvk 3 weeks

Given an array of n numbers in which all the members are less than or equal to k (k<n). device an algorithm of order O(k) to find the first repeating element.

Power Set and Permutation of a set 4 gvk 3 weeks

Write a program to print power set of a given set

Find a pair in a sequence whose sum is another element of the same sequence. 4 gvk 3 weeks

For example if array is [1, 4, 3, 14, 24, 30 ] then your program shoul be able to find out 1 and 3 as sum of them is present in array.

Asked in Amazon

fragment removal in all files 1 Rahul 1 month

Write a program to remove fragment that occur in all strings,where a fragment
is 3 or more consecutive word.
example :
input::
s1 = "It is raining and I want to drive home.";
s2 = "It is raining and I want to go skiing.";
s3 = "It is hot and I want to go swimming.";
output::
s1 = "It is raining drive home.";
s2 = "It is raining go skiing.";
s3 = "It is hot go swimming.";
removed fragment = "and i want to"
i was told that ...

[closed] copy the list 3 k53 2 months

Given a doubly linked list where
1. one link points to it’s next neighbour
2. Other link points to some random node in the list(could also point to NULL)
Write an algorithm to make a copy of this list

Neither Max nor Min 5 srikantaggarwal 3 months

Suppose a double Dimension array is given of order N x N . And it is filled with distinct elements . Now you have to find the atleast one row which neither contain the maximum or the minimum element among all the elements present . The runtime complexity should be less than O(N^2) .

Amazon Interview Question 5 srikantaggarwal 3 months

How can we print boundary nodes in a binary tree..?

Construct tree from Ancestor Matrix 13 3 months

You are given a matrix M[n, n] for a tree with n nodes. In the given matrix M, M[i, j] is true iff node j is an ancestor of node i. Construct the tree from the given matrix.

For example, you are given below matrix.

    1  2  3  4
1  0  1  1  0

2  0  0  1  0

3  0  0  0  0

4  0  1  1  0

You need to construct the below tree. In the constructed tree ancestor relationship should be correct. A node can come on left or right of its parent as you cannot determine th...

Amazon Interview Question for Software Engineer/Developer about Puzzle 4 3 months

There are two urns A and B and an equal number of red balls and blue balls.How do u place the balls in the urns such that the probability of picking up the red ball is greater?

Amazon
Amazon question 2 Vivek 3 months

Given two arrays , one is 1D array and other is 2D array . Now u need to
find out whether 2D array contains the subset of 1D array . The elements
of 1D array not neccessary present in the same row it can be either on the
up or down but should be continuous in the 2D array ..