I recently saw a great post on a "framework" for solving leetcode
Since I found it extremely helpful, I thought I create a blog post on it and explaining it so that anyone can start applying it to their leetcode practice.
Before going into the explanation I'll post below the framework (copied from my google docs notes):

In this post, I'll break down each of these steps and explain the intuition behind them.
If sorted then binary search or two pointer
The reasoning behind this is because two pointer approach and binary search, both require a sorted list. Therefore, any problem with an already sorted list is usually best approached with these either of these two algorithm.
Binary Search
In this section, binary search refers to this algorithm here:
Binary search is a way of quickly finding an item in a list of items, through narrowing down
where an item is by dividing the list in half each time.
Think of it as how a teacher would find a student's homework in a stack of homework papers sorted in alphabetical order.
If the students name starts with a "C" then should would probably first start by finding the middle homework, see what that is (let's say that it is "D") then look through the half of the papers that contain "C", then repeat, continuously halving the paper until the student's homework is found.
Two Pointer
On the other hand, two pointer algorithm explained here, also uses a sorted array. Two pointer solves the issue of needing to compare every item to each other in a list, by using a nifty logic that a sorted array can have:
In two pointers, you start with the first element in a list, and the last element in the list:

If the sum of the two elements is too large. Decrease the last element.
If the sum of the two elements is too small. Increase the first element.
The above works because we are in a sorted list. So moving to the right, will have higher values. While left is lower.
If permutations/subsets then backtracking
Backtracking is ...
Want the rest of this article? We're currently writing the rest of it! If you are interested in getting notified when the full article is ready, just subscribe here
If you are interested in getting more articles like this follow me on Twitter.
Want to find a mentor to help you with coding interviews or any engineering topic? Check out Tutr's Mentoring Platform to find the perfect mentor here.