amazon logo
Amazon· SDE III

Amazon OA - Feb 2025

Posted
29 Mar 2025
315 reads

Summary

I took an Amazon Online Assessment in February 2025 for an L5 role, which included two coding questions, GDS, and behavioral MCQs. While I struggled with one coding question, I still received an invite for the next steps.

How it went

Full OA was 2 coding questions + some GDS questions + some behavioural/culture fit questions. (MCQ)

Amazon L5, Feb 2025

Don't really remember Q1, but it was a pretty straightforward question

Here's Q2: Given two strings s and t, return the number of subsequences of s that are lexicographically strictly greater than t, modulo 1e9 + 7.

Example s = "aba" t = "ab" => expected return: 3

 Subsequence of s   |   strictly greater than t?
-------------------------------------------------
    a               |       no
    ab              |       no
    aa              |       no
    aba             |       yes
    b               |       yes
    ba              |       yes
    a               |       no

I came up with a DFS+Memo approach, that keeps track of the index of s and the length of the current subsequence I am pathing, so typically kinda a 2D top down DP, but only passed like 11 or 12 test cases out of 15 (TLE) :( ‎ Anyways, still got an invite for next steps the following day. Good luck!

Questions asked (1)

  1. 01

    Count Lexicographically Greater Subsequences

    Data Structures & Algorithms

    Given two strings s and t, return the number of subsequences of s that are lexicographically strictly greater than t, modulo 1e9 + 7.

    Example s = "aba" t = "ab" => expected return: 3

     Subsequence of s   |   strictly greater than t?
    -------------------------------------------------
        a               |       no
        ab              |       no
        aa              |       no
        aba             |       yes
        b               |       yes
        ba              |       yes
        a               |       no
    

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!