Here is my interview experience with Amazon for internship. Hope it helps.
Round 1 (Written test):
Q1. Given a string. Write a program to form a string with first character of all words.
Q2. Given a number n, find the number just greater than n using same digits as that of n.
Q1. Given two numbers represented by two linked lists, write a function that returns sum list. The sum list is linked list representation of addition of two input numbers.
Q2. Given n coins for two players playing a game. Each player picks coins from the given n coins in such a way that he can pick 1 to 5 coins in one turn and the game continues for both the players. The player who picks the last coin looses the game. You have to tell that for given n coins who looses the game?
Q1. Given a sorted array of 0’s and 1’s. Find out the no. of 0’s in it. Write recursive, iterative versions of the code and check for all test cases.
Q2. Recursive code to reverse a linked list(Handle all corner cases: when list has no nodes or contains a single node)
Q3. Write a function to check whether a binary tree is a sub-tree of another binary tree (Check for all corner cases).
I got internship offer from them.
Thanks CrazyforCode for helping me in my preparation. Truly speaking this site is well enough to prepare for any kind of interview.