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

Intro (This Is All Satire)

As an ex-english major, I decided that math wasn't enough to defeat my enemies. I needed 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 decided its time to do some investigative journalism.

Top LeetCode Patterns Sorted By Occurrence

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 Based On Occurrence And Difficulty

TopicDifficulty To LearnReturn On Investment# Of Problems Solved# Of ComfortabilityFlagged Question Num
Two Pointer - SimpleEasyHigh16??
Two Pointer - Sliding WindowEasyHigh18??
Two Pointer - Linked ListEasyHigh11??
Basic DSA - Array/HashMapEasyHigh8??
Basic DSA - StackEasyHigh7??
Basic DSA - Heap/Priority QueueEasyHigh7??
BFS - TreeEasyHigh8??
DFS - TreeEasyHigh8??
BST - TreeEasyHigh8??
BFS - GraphMediumHigh8??
DFS - GraphMediumHigh8??
BacktrackingEasyHigh9??
Two Pointer - Binary SearchEasyMedium8??
Dynamic ProgrammingHighMedium13??
Divide and ConquerMediumLow0??
Trie - GraphMediumLow3??
Union Find - GraphMediumLow??
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

Spaced Repitition

Now the other problem is the amount of leetcode questions. Even though all of them can be organized into 20-30 patterns (and their sub patterns), ideally a candidate would be able to do at least the NeetCode 250 blindfolded.

So its time to whip out the o'l spaced repitition flash card trick.

todo: add to leetcode section spaced repetition algo/ui for all question cards we have