Reported February 2024
Twiliosorting

Find Maximum Greatness

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

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

Twilio's February OA included a problem called Find Maximum Greatness, and candidates report it's deceptive in its simplicity. You read the title and think it's asking for some greedy max calculation, then you realize the constraints or the definition of 'greatness' flip the whole approach. This is the kind of problem where the first instinct is wrong. StealthCoder reads the full problem text on screen and immediately flags the actual pattern, so you're not burned by a misreading in the live assessment.

Pattern and pitfall

Without the verbatim problem text, the title points toward either a sorting-based greedy approach or a dynamic-programming optimization over a sequence. The word 'maximum' combined with 'greatness' often masks a comparison problem, array rearrangement, or pairwise matching scenario. Candidates who solve it successfully usually sort the input in a specific way and then apply a two-pointer or greedy iteration. The trap is assuming 'greatness' means the sum or product you'd naively compute. In the live OA, if you blank on the trick, StealthCoder will show you the pattern and a working skeleton so you can recover and submit something correct rather than timeout guessing.

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 Find Maximum Greatness 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

Related leaked OAs

⏵ The honest play

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

Twilio 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.

Find Maximum Greatness FAQ

Is this a sorting problem, or is it dynamic programming?+

Most candidates who report success use sorting as the setup, then iterate greedily or with two pointers. DP is less likely here. The insight is usually about order: if you sort the array in a certain way, the 'greatness' becomes computable in one pass.

What's the most common pitfall?+

Candidates try to maximize greatness by pairing elements greedily without sorting first, or they misinterpret what 'greatness' means. Re-read the definition carefully. It's almost always a relational property between elements, not a standalone value.

Can I brute force this in 48 hours of prep?+

No. This problem requires seeing the pattern. Brute force will TLE. Instead, focus on understanding why sorting helps. Write out a small example by hand and trace the optimal pairing or arrangement.

How much code is the solution?+

Typically 15-30 lines of clean code if you have the pattern. Sorting, then a loop with two pointers or greedy selection. If you're writing more than 40 lines, you're overcomplicating it.

Is this problem still relevant for Twilio's hiring bar?+

It was reported in February 2024, so yes. OA problems recycle and variant across cohorts. The sorting-plus-greedy or sorting-plus-DP pattern is evergreen in tech interviews, so learning the approach here will transfer.

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

OA at Twilio?
Invisible during screen share
Get it