LeetCode Question · Aug 2024 · Los Angeles

Flexport | SDE 2 | Rejected

1 upvote 1,228 views 6 replies

Question Details

Online Assessment #

Round 1 1. My Calendar 1: Leetcode - Solved this 2.

Follow up on this: - Code not working as expected \t3. Merge events: \t\t \t \tmerge(10, 20) => [[10, 20]] \tmerge(40, 50) => [[10,...

Full Details

Online Assessment

image

image

image

image

Round 1 1. My Calendar 1: Leetcode - Solved this
2.

Follow up on this: - Code not working as expected
\t3. Merge events:
\t\t
\t

\tmerge(10, 20) => [[10, 20]]

\tmerge(40, 50) => [[10, 20], [40, 50]]

\tmerge(20, 30) => [[10, 30], [40, 50]]

\tmerge(45, 55) => [[10, 30], [40, 55]]
\t

I solved it using merge intervals algorithm, but interviewer was expecting better solution than that.
Tried to think of an approach, was able to explain the approach. But coding took some time and at the end code was not giving expected output.

Due to nervousness couldn\'t code it up.

All the best in your journey :)

About This Question

This is a reported interview question from a flexport interview for a swe role during the oa round reported in 2024.

It covers the following topics: General Experience .