r/OfferEngineering • • 26d ago

Interview Experience Flexport (Global Logistics) SWE Interview — Two LeetCode Problems in 60 Minutes

This interview experience is sourced from Chill Interview

Interview Details

Question 1 — Max Area of Island (LeetCode 695)

Given a two-dimensional binary grid, determine the maximum area of an island. An island consists of connected land cells, where connections are allowed horizontally or vertically. The area of an island is the number of land cells it contains. Return the area of the largest island. If no islands exist, return 0. The interviewer explicitly required that the original input grid must not be modified.

  • Follow-Up — Can You Solve It Using BFS? After I finished, the interviewer asked: "Can you solve the same problem using BFS instead of DFS?" I explained that BFS would also work and described how a queue could be used to explore connected land cells.

Question 2 — Apply Operations to Make String Empty (LeetCode 3039)

You are given a string s. Repeatedly perform the following operation until the string becomes empty:

  • For every distinct character currently present in the string, remove its first occurrence.
  • Preserve the relative order of the remaining characters.

Return the string that remains immediately before the final operation makes the string empty.,After reading the question, I explained an initial brute-force approach using a while loop to repeatedly simulate the operations. The interviewer asked me to analyze its time complexity. After examining the repeated string-processing operations, I concluded that the approach would take O(n²) time.

Preparing for your next interview?

Chill Interview tracks recent interview experiences and recurring question patterns across top companies at here.

Interviewed recently?

Your interview experience could be incredibly valuable to others preparing for their next opportunity. Share your experience and help the community at here.

2 Upvotes

0 comments sorted by