Amazon | QA Engineer-L5 | Chennai | May 2020 [Received Offer]
Anonymous User
3295

I applied through one of the job portals and received call in 3 days. Interviews got scheduled after couple of days:

First round: Coding and Test cases related

  1. Write a program to accept an integer and print closest prime number to it.
    Answer:
def printNearestPrime(x):
    i=1
    while(True):
        if isPrime(x+i):
            return x+i
        elif isPrime(x-i):
            return x-i
        else:
            x+=1

def isPrime(n):
    isPrime = True
    for i in range(2,(n//2)+1):
        if n%i==0:
            isPrime = False
            break
    return isPrime
  1. Write a program to print following pattern
        1    
	  1 2 1
    1 2 3 2 1 
  1 2 3 4 3 2 1

Answer: Looks easy. I leave it to you guys to solve.

  1. Write a program to print all the combinations of numbers from a list which result to a given target.
    For eg:
    input = [2,4,5,6,3,2,1], target = 9
    output = [[2,4,3],[4,5],[6,3],[6,2,1]]
  2. Write test cases on a program which prints out whether two strings are anagrams of each other or not.
  3. Write test cases on an application which accepts a pdf file and converts it into HTML format.

Second Round: Testing round
How would to approach or design a feature to tap on a word and list out all anagrams of the word from a Kindle book?

Third round: Testing round
How would you test a vending machine which accepts cash and item id and then dispenses the corresponding food item from slot.
You had to list out all categories of testing like functional, performance, security etc and explain in detail.

Fourth Round: Behavioural Round
Few questions about career, what projects I did, what challenges I faced, most daring task I undertook and how I completed it, most complex project I dealt with etc.

Hope it is helpful to the QA community out there.

Comments (5)