amazon logo
Amazon· sde 6m intern

Amazon | Onsite | SDE 6M Intern

Location
onsite
Posted
2 Dec 2021
257 reads

Summary

I interviewed for an SDE 6M Intern position at Amazon onsite. The interview primarily focused on data structures and algorithms, where I was asked two distinct coding problems, one of which I solved in O(nlogk).

How it went

I recently had an onsite interview for the SDE 6M Intern role at Amazon. The interview session consisted of two challenging data structures and algorithms problems. I provided my solutions and approaches for both questions.

Questions asked (2)

  1. 01

    Partition Array Around Target Value

    Data Structures & Algorithms · Medium

    Given an array of integers and a target value, return array such that the values that are less than target should be on left side of the array and values that are greater than target should be on right side of the array. Values that are equal to target should be in between other values.

    Example:

    nums = [9, 12, 5, 10, 14, 3, 10], target = 10
    return = [9, 5, 3, 10, 10, 12, 14

    nums=[-3, 4, 3, 2], target = 2
    Output: [-3, 2, 4, 3]

    Open the problem
  2. 02

    Sort K-Sorted Array

    Data Structures & Algorithms · Medium

    You are given an array of integers and value k. Values in array are displaced by up to k position. Return the sorted array in most optimal way.

    Example:

    nums = [20, 30, 10, 40, 60, 50, 70, 100, 80, 90], k = 2
    return = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Amazon recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!