TryBugHunt
All collections
๐Ÿ“ฆCampus Placement ยท Max ~75 mins

Amazon SDE OA Simulation

Amazon Online Assessment: Code Review & Bug Remediation

20-challenge rigorous Amazon SDE-1 Online Assessment simulation: 10 JavaScript & 10 Python challenges covering sliding window algorithms, binary search boundaries, asynchronous race conditions, and shared reference mutations.

JavaScript & PythonHard19 ChallengesBugHunt Max Exclusive
๐Ÿ”’

BugHunt Max Placement Exam Simulation (Amazon)

Full campus hiring assessment with Bar Raiser AI viva cross-examination, priority queue, and verified certificate badge.

Your Progress

0 of 19 completed

Start Track

Amazon Assessment Questions

Showing 19 debugging challenges

  1. Q1

    3 people book the last seat

    bookSeats(n) sends n booking requests at the same time for 1 remaining seat, and returns how many bookings succeeded. It should never be more than 1. Example: await bookSeats(3) โ†’ 1.

    hard
  2. Q2

    Adding 4 votes at once keeps only the last

    tallyVotes(votes) adds up every vote. The votes are counted at the same time with Promise.all. Example: await tallyVotes([1, 2, 3, 4]) โ†’ 10.

    hard
  3. Q3

    Async sum gives "[object Promise]3"

    sumAsync(nums) adds up values that are fetched with an async function. Example: await sumAsync([1, 2, 3]) โ†’ 6.

    hard
  4. Q4

    Doubling with forEach returns an empty list

    doubleAll(nums) doubles every number with fetchDouble, which takes a moment, and returns the results. Example: await doubleAll([1, 2, 3]) โ†’ [2, 4, 6].

    hard
  5. Q5

    Word lengths come back as promises, not numbers

    wordLengths(words) returns the length of each word. Example: await wordLengths(["abc", "defg"]) โ†’ [3, 4].

    medium
  6. Q6

    Total shows "[object Promise]" instead of 6

    sumDelayed(nums) adds up numbers that each arrive after a short delay. Example: await sumDelayed([1, 2, 3]) โ†’ 6.

    medium
  7. Q7

    Cached loader runs 3 times instead of once

    countLoads(n) calls a cached loader n times at once and returns how many times the slow load really ran. It should always be 1. Example: await countLoads(3) โ†’ 1.

    hard
  8. Q8

    Counter method crashes inside forEach

    countAll(items) counts the items using a Counter object. Example: countAll([1, 2, 3]) โ†’ 3.

    hard
  9. Q9

    AI Attempt: The English List

    An AI assistant wrote formatNames(names), which turns a list into English, like ["A", "B", "C"] โ†’ "A, B and C". It must not change the list it is given. test_format checks that. Example: test_format(["Alice", "Bob", "Charlie"]) โ†’ "Alice, Bob and Charlie".

    hard
  10. Q10

    Page 1 shows the second page of items

    pageItems(items, page, size) returns one page of items. Pages start at 1. Example: pageItems([1, 2, 3, 4, 5, 6], 1, 3) โ†’ [1, 2, 3].

    hard
  11. Q11

    Best window of 2 misses the last pair

    max_window_sum(nums, k) returns the biggest sum of k numbers in a row. Example: max_window_sum([1, 2, 3, 10], 2) โ†’ 13 (3 + 10).

    hard
  12. Q12

    Binary search can't find the last item

    binary_search(nums, target) returns the index of target in a sorted list, or -1 if it is not there. Example: binary_search([1, 3, 5, 7, 9], 9) โ†’ 4.

    hard
  13. Q13

    A reading of 0 degrees counts as missing

    describe_temp(readings, station) returns "recorded" when the station sent any reading, including 0 degrees, and "missing" when it sent none. Example: describe_temp({"north": 0}, "north") โ†’ "recorded".

    hard
  14. Q14

    AI Attempt: FizzBuzz never says FizzBuzz

    An AI assistant wrote this FizzBuzz. fizzbuzz(n) returns "Fizz" for multiples of 3, "Buzz" for multiples of 5, "FizzBuzz" for multiples of both, and otherwise the number as text. Example: fizzbuzz(15) โ†’ "FizzBuzz".

    easy
  15. Q15

    AI Attempt: The anagram checker

    An AI assistant wrote this for a classic interview question. is_anagram(a, b) returns True when both words use the same letters, the same number of times. Example: is_anagram("listen", "silent") โ†’ True, is_anagram("aab", "abb") โ†’ False.

    medium
  16. Q16

    AI Attempt: Remove all occurrences

    An AI assistant wrote this for a classic interview question. removeAll(arr, item) removes every copy of item from the array. Example: removeAll([1, 2, 2, 3], 2) โ†’ [1, 3].

    medium
  17. Q17

    Word count says 3 for "hello world"

    count_words(text) counts the words, however many spaces are between them. Example: count_words("hello world") โ†’ 2.

    easy
  18. Q18

    Age is a year too high before the birthday

    age_on(birth_iso, today_iso) returns how old someone is on a given date. Example: age_on("2000-12-25", "2024-06-01") โ†’ 23.

    medium
  19. Q19

    Two shoppers end up with the same basket

    make_baskets(first, second) puts each item in its own new basket. Example: make_baskets("apple", "bread") โ†’ [["apple"], ["bread"]].

    hard

More collections to explore

๐ŸŒฑ

Your First 5 Bugs

Five beginner-friendly bugs with clear symptoms and satisfying fixes. The best place to start if you are new to debugging.

View track โ†’
๐Ÿ

Python Gotchas

Mutable default arguments, list.sort() returning None, and mutating a list while iterating over it.

View track โ†’
โšก

JavaScript Type Coercion Traps

Accidental string concatenation, array sort ordering numbers alphabetically, and zero being falsely treated as missing.

View track โ†’
๐Ÿ“

The Off-By-One Gauntlet

Fencepost errors, inclusive vs exclusive slice bounds, and loops that step one position too far.

View track โ†’
โณ

Async Nightmares

The asynchronous bugs that silently swallow data: un-awaited promises, forEach loops with async callbacks, and race conditions.

View track โ†’
๐Ÿค–

AI Code Comprehension

Simulate modern Code Comprehension rounds: classic coding questions written by an AI that pass the obvious test, but break on subtle edge cases.

View track โ†’
๐Ÿข

TCS NQT Placement Simulation

Simulate the actual TCS NQT hands-on coding & debugging assessment: 20 curated challenges (10 JavaScript + 10 Python) covering prime number boundaries, string parsing, Fibonacci series, Two Sum map lookups, and loop invariants.

View track โ†’
๐Ÿ’ผ

Infosys SP / DSE Placement Simulation

20-challenge advanced assessment for Infosys Specialist Programmer (SP) and Digital Specialist Engineer (DSE): 10 JavaScript & 10 Python challenges covering sorting, binary search, sliding window, set mutations, and non-trivial edge conditions.

View track โ†’