Amazon Software Engineer Interview Experience — Two Online Assessment Questions on Calorie-Maximizing Jumps and Password Similarity

Amazon·Software Engineer·Sep 2025
Online Assessmentmedium

Question 1:

Problem description: A user is doing jump exercises using an Amazon fitness tracker. There are n blocks of different heights (height[i] is the height of the i-th block). The user starts from the ground (height 0) and must jump to every block exactly once, with the goal of maximizing calories burned. The calories burned jumping from block i to block j are calculated as (height[i] - height[j])^2. Once the user lands on a block, they cannot go back to the ground. Find the maximum calorie burn.

For example:
n = 3
height = [5, 2, 5]
Optimal jump order: ground -> block 3 -> block 2 -> block 1
Calories: (0-5)^2 + (5-2)^2 + (2-5)^2 = 25 + 9 + 9 = 43

Expected return value: 43

Question 2: Problem description: Determine whether two sets of passwords are similar. password1 and password2 are considered similar if, after removing all occurrences of at most one character from each (removing zero characters is also allowed), the two become anagrams of each other.

For example:
n = 1
password1 = "safddadfs"
password2 = "famafmss"

Remove all 'd' from password1 -> "safafs"
Remove all 'm' from password2 -> "faafss"

These two strings are anagrams, so return [true].

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Amazon
Role
Software Engineer
Rounds
Online Assessment
Difficulty
medium
Interview date
Sep 2025
Questions from this interview
1 question

Real Amazon interview experiences

First-hand reports from Amazon candidates — the rounds, the questions they were asked, and how it went.

All 136 Amazon interview experiences