Amazon Internship Interview Round DS & Algo Questions

Amazon Internship Interview Round DS & Algo Questions

For internship, apart from online assessment (OA), there are two rounds of DS & Algo interviews (1 hr each) along with behavioral questions.

Low Level Design questions are not asked from interns. Although I saw a few posts where LLD of elevator system was asked for SDET intern positions. But these were exception and not the norm.

In case you are looking for these pages:

Amazon DSA questions: https://codezym.com/lld/amazon-dsa

Amazon LLD questions: https://codezym.com/lld/amazon

OA has DSA and AI assisted coding question.

For AI assisted coding round, you have to choose one repository. Options may be C++, Django, Spring Boot, ReactJS, Node.js, Ruby on Rails etc. The interface includes a code editor and an AI assistant for project-related questions. You have 60 minutes to implement the required behavior and pass all test cases (around 6). AI assistant could only help with searching through the project, finding files, and understanding the codebase.

This list has coding round questions from both SDE intern and SDET intern interview rounds.

For India, Amazon HackOn is an effective way to get internship call. Amazon sometimes recruits not only finalists, but also eligible participants who performed sufficiently well in the coding round.
You will receive AUTA interest form if you did well in HackOn.

For USA and other countries, directly applying through their job portal or a referral are the ways to go.

Here is the list of questions:

2

Maximum Smooth Transitions in a Photo Slideshow

Each photo is portrait or landscape, in the order it was taken. A transition is smooth when the next photo has the same orientation. Remove any photos without reordering the rest to get the most smooth transitions.

https://codezym.com/question/492-max-smooth-photo-transitions
3

Minimize Total Weight After Halving Operations

Each halving operation picks one item and replaces its weight w with floor(w / 2), and the same item can be picked again. Perform exactly the given number of operations and return the smallest possible total weight.

https://codezym.com/question/498-minimize-total-weight-halving
5

Minimum Swaps to Group Packages on a Circular Conveyor Belt

Each slot on a circular conveyor belt holds a package (1) or is empty (0), and one swap exchanges any two slots. Find the fewest swaps that put all packages in consecutive slots, where the group may wrap around.

https://codezym.com/question/499-min-swaps-group-packages
7

Currency Conversion Queries

Using exact exchange rates like "USD,CAD,2.0" that also work in reverse, find the rate between two currencies, even through other currencies. Return -1.0 if they are not connected. A follow-up answers many such queries.

https://codezym.com/question/443-currency-conversion-queries
8

Design Category Hierarchy System

Design a system that stores categories, subcategories and products. Fetch every product under a category and its subcategories that matches all name and price filters, and keep it easy to add new filter types later.

https://codezym.com/question/457-category-hierarchy-system
9

Search for an Element in a Stream Without Built-In Sets

Integers arrive one by one in a stream, and at any time you must check whether a value has arrived before. Build your own data structure, because built-in sets and maps like HashSet or dict are not allowed.

https://codezym.com/question/501-search-element-in-stream
10

Longest Lit Stretch After One Street Lamp Repair

A row of street lamps is a mix of lit and dark lamps. A crew lights one block of exactly blockSize neighbouring lamps. Choose the block that gives the longest run of lit lamps and return that length.

https://codezym.com/question/503-longest-lit-stretch-repair
16

Sorted Fence Heights

One operation raises a consecutive group of fence sections by the same amount x and costs x, however many sections it covers. Return the minimum total cost to make the heights non-decreasing from left to right.

https://codezym.com/question/363-sorted-fence-heights
17

Minimum Letter Sticker Sheet Design

Design one sticker sheet of exactly stickersPerSheet letters, then use identical copies of it to spell a word. Use as few copies as possible and return the lexicographically smallest such sheet, or "-1" if none works.

https://codezym.com/question/364-min-letter-sticker-sheet-design
19

Maximum Usable Cable Length

Cut some cable rolls into exactly segmentCount pieces, using every chosen roll completely. The longest half of the pieces fail inspection. Return the maximum total length of the pieces that pass.

https://codezym.com/question/366-max-usable-cable-length
21

Minimum Sheet Cutting Time

A laser can cut a sheet only if the sheet's grade is within its rating. Each cut takes one second plus one second of cooling, and all lasers work in parallel. Return the minimum time to cut every sheet, or -1 if impossible.

https://codezym.com/question/368-min-sheet-cutting-time
22

Possible Final Sensor Readings

You can repeatedly take a group of readings from the start and keep only its smallest, or a group from the end and keep only its largest. Return a binary string marking which readings can end up as the last one left.

https://codezym.com/question/369-possible-final-sensor-readings
23

Longest and Lexicographically Greatest Palindromic Substrings

Find the longest palindromic substring of a string. One method breaks ties by the earliest start, and another returns the lexicographically greatest of the longest palindromes.

https://codezym.com/question/370-longest-greatest-palindromes
25

Maximum Demolition Profit

Buildings in a row have positive or negative values. While more than two remain, demolish the first two, the last two, or the first and last one. Return the maximum total value you can collect.

https://codezym.com/question/371-max-demolition-profit
28

Count Book Line Groups by One Letter Swap

Two lines with the same letters are connected if they are equal or one swap of two letters makes them equal. Lines linked directly or through other lines form one group. Count the separate groups.

https://codezym.com/question/373-count-book-line-groups
34

Use Path Operations To Minimize Tree Diameter

One operation picks a path in a tree and connects every vertex on it directly to the path's start. Return the fewest operations needed to bring the tree to its smallest possible diameter.

https://codezym.com/question/171-minimize-tree-diameter
36

Count Valid Cleanup Plans

Each resident has a number and either joins the cleanup or stays home. A joiner needs at least that many other people to join, and someone at home needs the total turnout below that number. Count the plans that satisfy everyone.

https://codezym.com/question/378-count-valid-cleanup-plans
37

Most Common Lab Tool Pair

Experiment logs from several classes list the tools used in each experiment. Find the pair of different tools used together in the most experiments, picking the lexicographically smallest pair on ties.

https://codezym.com/question/379-most-common-lab-tool-pair
44

Candy Jar Pickup Score

Each turn takes one candy from the fullest jar and scores the largest count plus the smallest non-zero count before the pick. Return the total score after the given number of picks, stopping early if every jar is empty.

https://codezym.com/question/387-candy-jar-pickup-score
46

Currency Conversion

Convert an amount using one-way exchange rates, possibly through other currencies, without visiting any currency twice. Pick the path that gives the most money, truncate to 2 decimal places, and return -1.0 if no path exists.

https://codezym.com/question/129-currency-conversion