OpenAI 26 SDE OA Two Questions Passed with flying colors - Full Review & Question Type Explanation

236 Views
No Comment

OpenAI 26 SDE OA is one of the most "engineering-oriented" tests I've done this year. To be honest, the overall difficulty is not in the style of an algorithm competition, but more in the direction of "problem reading + scene abstraction ability". Both questions are typical engineering thinking questions, if you find the right direction, it's not really difficult; but if you get it wrong the first time, you'll be circling around in the details again and again, wasting a lot of time.

This review comes from a student we took with a more conventional role background, but steadily got all the sample ACs in this OA, and went smoothly to the VO interview stage later.

OpenAI 26 SDE OA

OpenAI 26 SDE OA Overall Experience & Time Allocation Suggestion

The entire OA is two questions and 90 minutes.

  • The first question is a big read, but the code is short.
  • The second question is more logical and categorized and is one of the easier questions in the set to get stuck on.

The feedback from the trainees was:
It takes more time to read a problem + derive it than to write the code, and OpenAI's OA clearly wants to see "can you build a model quickly and under pressure".

Question 1: Largest Non-Overlapping Subset

You are given two arrays start And finish, each of length n.
The i-th event starts at start[i] and ends at finish[i].
You need to select the maximum number of events such that no two events overlap.

Return:
The size of the largest non-overlapping subset.

Ideas

This question is essentially classic interval scheduling:

  1. Sort by finish (finish in descending order)
  2. Find the next event "that connects" every time.
  3. End time ≤ next start time selectable

The difficulty of this problem is not in the algorithm, but in the following boundaries:

  • Does "end time equals start time" count as an overlap? (It's catchable.)
  • Don't mess up index after sorting
  • Sorting + Line Scanning must be written cleanly when inputs are large

Question 2: Grouping Marbles

You are given an array of marbles, each with a color ID.
You must group the marbles into consecutive segments.
Each segment must contain marbles of only one color.
Your goal is to compute the minimum number of operations required to make the entire array valid, and the number of operations required to make the entire array valid, and the number of operations required to make the entire array valid.
where one operation allows you to move a marble to any position.

Return:
The minimum number of moves needed.

Ideas

This question looks like DP or greedy at first, but at its core it really is:
How much does it cost to move the same colors together?

Key Observation:
Each color eventually becomes a continuous segment.
To make the color C connected, the essence is:

  • Find the location of all the C's.
  • Let them line up in a continuous interval
  • Calculate the difference between the "present position" and the "target position interval".

A steady pace to help you capitalize on offers

The trainees themselves said it was very true that the OA was able to get all the ACs this time: it was not that they suddenly became stronger, but that they did not make any mistakes at the key points.

And that's exactly what Programhelp 's core value of OA's untraceable online assists:
In the moment you are doing the question, in a way that does not disturb the platform judgment, real-time to help you stabilize the direction, avoid the logic pitfalls, so that you can put the real ability to play more stable and complete.
If you're also preparing for high-intensity OA's like OpenAI, Meta, Google, Citadel, we're always here to help you get your pass rate firmly where it should be.

author avatar
jor jor
END
 0