Jc-alt logo
jc
4 min read
#data structures and algorithms

Intro

As an ex-english major, I've decided that math isn't enough to defeat my enemies. I need to consult the classics. In the Art of War, Sun Tzu says:

If you know the enemy and know yourself, you need not fear the result of a hundred battles.

So, I've decided its time to do some investigative journalism.

Top LeetCode Patterns Occurrence

According to Algo.Monster: https://algo.monster/problems/stats

PatternPercentage In Online Assessments# Of Problems Solved# Of ComfortabilityNumber Of Problems In LeetcodePercentage Of All Problems In Leetcode
Basic DSA (Linked List, Array, Hash Map, Stack, Queue, Sorting)16.9????
Misc12.1????
Two Pointers12.0????
Dynamic Programming10.8????
DFS10.0????
BFS8.8????
Backtracking7.1????
Adv Data Structure7.1????
Binary Search5.8????
Heap4.8????
Graph2.5????
Simulation2.2????

Optimal Studying ROI

According to Algo.Monster: https://algo.monster/problems/stats

TopicDifficulty To LearnReturn On Investment# Of Problems Solved# Of ComfortabilityFlagged Question Num
Two PointerEasyHigh11 + 11??
Sliding WindowEasyHigh17?121-862 (all)
Breadth First SearchEasyHigh[(15) + 2] + [(9) + ]??
Depth First SearchMediumHigh[(15) + ] + [(9) + ]??
BacktrackingEasyHigh9??
HeapMediumMedium7??
Binary SearchEasyMedium8??
Dynamic ProgrammingHighMedium13 + 10??
Divide and ConquerMediumLow0??
TrieMediumLow3??
Union FindMediumLow[(15)] + [()]??
GreedyHighLow8??

Planning Out What To Study

Great! Now with this information, we have a general estimation of the probability of getting certain question during an online coding assessment.

Despair

But yet, I know in my heart this isn't enough. This isn't even close. But what more could I do? Optimize my question practice schedule with a recurrence matching the probability? (I actually did this for about 4 months, it made a tiny dent in the 3600 total leetcode questions). Sure that would have worked eventually, but c'mon. Is mindlessly going through questions for hundreds of hours really what leetcode is all about?

I mean yeah, pretty much, but I wasn't about to do that. When I said 4 months I was not kidding. And yet, as time went on, it began to see like that was truly the only way.

Hope

The opportunity of defeating the enemy is provided by the enemy them self - Sun Tzu

I've done it. I've discovered a critical flaw with assessments strategies. The companies, they REUSE QUESTIONS!

will continue writing on lunch.

Questions By Company List:

todo