Join waitlist
Interview PrepCommunity question

Amazon SDE intern OA

Asked by Varun Reddy 1 month ago 4 answers 15 votes

HackerRank, 2 questions, 70 min + work style survey after.

Q1: longest substring with at most k distinct characters (sliding window)
Q2: grid, servers updating neighbours each day, minimum days until all updated

Q1 all test cases. Q2 11/14, TLE because I ran a separate BFS from every updated server 🤦 waiting for result.

4 answers

Karthik Rajan1 month agoMost voted6

Q2 is rotting oranges. put all starting servers in the queue together and do one BFS

Varun Reddy1 month ago1

@Karthik yeah realised that 5 min after submitting

Sakshi Jain1 month ago1

do partial test cases count?

Varun Reddy1 month ago1

@Sakshi seniors said one full + one partial can still go through. let's see

Related questions

Go deeper

Want the full explanation, not just an answer?

Structured lessons on DSA, core CS, Java and interview skills, each ending in a quiz so you know it stuck.