Jc-alt logo
jc
8 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????
DFS10.0????
BFS9.8????
Backtracking7.1????
Dynamic Programming6.8????
Adv Data Structure7.1????
Binary Search5.8????
Heap4.8????
Graph4.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 - TreeEasyHigh4??
DFS - TreeEasyHigh14??
BFS/DFS - TreeEasyHigh6??
BST - TreeEasyHigh5??
BFS/DFS - GraphMediumHigh13??
01 BFS - Adv GraphMediumHigh2??
A Star - Adv GraphMediumHigh2??
BiPartite - Adv GraphMediumHigh2??
Dijkstras - Adv GraphMediumHigh5??
Hierholzer - Adv GraphMediumHigh3??
Kahn Topological - Adv GraphMediumHigh24??
Kruskal Prim - Adv GraphMediumHigh2??
Multi Source BFS - Adv GraphMediumHigh3??
Tarjan SCC - Adv GraphMediumHigh1??
BacktrackingEasyHigh10??
Two Pointer - Binary SearchEasyMedium12??
Dynamic Programming - 1DHighMedium12??
Dynamic Programming - 2DHighMedium10??
Divide and ConquerMediumLow0??
Trie - GraphMediumLow3??
Union Find - GraphMediumLow0??
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.

Review

Great! You have an interview coming up. Its time to do a quick review (imagine you had an exam in a week that you JUST found out about, you need to delegate your time to review the most occurring info first.)

Top 11 From (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 - TreeEasyHigh4??
DFS - TreeEasyHigh14??
BFS/DFS - TreeEasyHigh6??
BST - TreeEasyHigh5??
BFS/DFS - GraphMediumHigh13??

Two Pointer - Simple

Key Concepts

3 Problems To Review

Two Pointer - Sliding Window

Key Concepts

3 Problems To Review

Two Pointer - Linked List

Key Concepts

3 Problems To Review

Basic DSA - Array/HashMap

Key Concepts

3 Problems To Review

Basic DSA - Stack

Key Concepts

3 Problems To Review

Basic DSA - Heap/Priority Queue

Key Concepts

3 Problems To Review

BFS - Tree

Key Concepts

3 Problems To Review

DFS - Tree

Key Concepts

3 Problems To Review

BFS/DFS - Tree

Key Concepts

3 Problems To Review

BST - Tree

Key Concepts

3 Problems To Review

BFS/DFS - Graph

Key Concepts

3 Problems To Review