Reported August 2024
Sofigreedy

Get Maximum Jobs

Reported by candidates from Sofi's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Sofi OA. Under 2s to a working solution.
Founder's read

You've got a Sofi OA coming up from August 2024 and they're testing you on job maximization. This looks like a greedy or interval scheduling problem hiding in plain sight. The trick is recognizing the constraint that kills naive solutions, then picking the right trade-off: maximize count, maximize profit, or respect time windows. StealthCoder sits invisible during the OA and can prompt the pattern if you freeze.

Pattern and pitfall

Get Maximum Jobs is almost certainly a greedy problem where you rank jobs by end time (or profit per duration) and greedily pick non-overlapping jobs. The trap: candidates try to maximize the number of jobs, then realize the problem actually wants maximum profit or must respect a deadline. The second trap: forgetting to sort, or sorting by the wrong field. If it's profit-based, you might need dynamic programming to compare 'take this job' vs. 'skip it'. The wall most candidates hit is misreading the constraint. Sofi's version likely has a clean greedy solution if you sort correctly. StealthCoder reads the exact constraint on screen and can feed you the right sort order in real time.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill Get Maximum Jobs cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder
⏵ The honest play

You've seen the question. Make sure you actually pass Sofi's OA.

Sofi reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Maximum Jobs FAQ

Is this really just sorting and greedy picking?+

Yes, but only if you sort by the right field. If jobs have start/end times, sort by end time and greedily pick non-overlapping ones. If there's profit, you might need DP to compare subsets. Read the constraint carefully. That's where most candidates lose points.

What's the most common mistake on this problem?+

Sorting by start time instead of end time, or not recognizing that a deadline kills the greedy approach. Also: forgetting to check for overlap at all. Many candidates code a solution that assigns overlapping jobs and wonder why it fails.

Do I need to handle a time limit or deadline?+

Depends on the exact version Sofi is running. If there's a global deadline, that's a constraint you can't ignore. If it's just 'pick non-overlapping jobs', pure greedy works. Always skim for words like 'by time X', 'within hours', or 'deadline'.

Can I solve this in 45 minutes?+

Absolutely, if you recognize the pattern in the first 10 minutes. Sorting is O(n log n), greedy pick is O(n). The code is short. The risk is misunderstanding the problem. Spend 3 minutes reading carefully.

Should I code DP or greedy first?+

If profit is involved and the constraint is unclear, start with greedy. It's faster to code and often correct. If greedy fails on the examples, switch to DP. But DP is slower to write. Greedy is the default bet for Sofi-style problems.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Sofi.

OA at Sofi?
Invisible during screen share
Get it