# The Blind 75 Leetcode Series: The First Trimester Review

We have gone through the first third of the blind 75 list. It’s a good time to review what we’ve done so far and techniques we’ve used. We also want to see if we can identify any relationship between type of problem and techniques we can use.

Referring back to this list, for the first 25 questions, I’ll list the link to each one of them:

- Two Sum
- Longest Substring Without Repeating Characters
- Longest Palindromic Substring
- Container With Most Water
- 3Sum
- Remove Nth Node From End of List
- Valid Parentheses
- Merge Two Sorted Lists
- Merge k Sorted Lists
- Search in Rotated Sorted Array
- Combination Sum
- Rotate Image
- Group Anagrams
- Maximum Subarray
- Spiral Matrix
- Jump Game
- Merge Intervals
- Insert Interval
- Unique Paths
- Climbing Stairs
- Set Matrix Zeroes
- Minimum Window Substring
- Word Search
- Decode Ways
- Validate Binary Search Tree

*Types of Problem*

Then we look at the type of problems:

- Array/String:

`- Two Sum`

- Longest Substring Without Repeating Characters

- Longest Palindromic Substring

- Container With Most Water

- 3Sum

- Valid Parentheses

- Search in Rotated Sorted Array

- Combination Sum

- Rotate Image

- Group Anagrams

- Maximum Subarray

- Spiral Matrix

- Jump Game

- Merge Intervals

- Insert Interval

- Set Matrix Zeroes

- Minimum Window Substring

- Word Search

- Decode Ways

- Linked List:

`- Remove Nth Node From End of List`

- Merge Two Sorted Lists

- Merge k Sorted Lists

- Numbers/Math

`- Unique Paths`

- Climbing Stairs

- Tree

`- Validate Binary Search Tree`

As you can see, we have awful lot of array type of problem. Yet not every array problem is asking for similar things and we cannot simply use one technique to solve them. It’s better if we take a dive into what exactly these questions are asking for.

*Types of Question Asks*

- Sliding Window

`- Longest Substring Without Repeating Characters`

- Minimum Window Substring

- Maximum Subarray

- Math Calculation

`- Two Sum`

- 3 Sum

- Combination Sum

- Maximum Subarray

- Container With Most Water

- Jump Game

- Climbing Stairs

- String manipulation

`- Longest Palindromic Substring`

- Valid Parentheses

- Rotate Image

- Group Anagrams

- Spiral Matrix

- Unique Paths

- Set Matrix Zeroes

- Minimum Window Substring

- Decode Ways

- List Traversal & Merge

`- Remove Nth Node From End of List`

- Merge Two Sorted Lists

- Merge k Sorted Lists

- Merge Intervals

- Insert Interval

- Search

`- Search in Rotated Sorted Array`

- Word Search

- Trees

`- Validate Binary Search Tree`

if we list out the techniques we use to solve these problems to find a better relationship between problem types and solution. If you remember, we used several different ways to solve for a lot of problems, so you will see some repeated problems in the lists below.

*Techniques*

- Two-pointers:

`- Two Sum`

- Longest Palindromic Substring

- Container With Most Water

- 3 Sum

- Remove Nth Node From End of List

- Hash Map

`- Two Sum`

- Longest Substring Without Repeating Characters

- Group Anagrams

- Minimum Window Substring

- Dynamic Programming

`- Longest Palindromic Substring`

- Combination Sum

- Maximum Subarray

- Jump Game

- Unique Paths

- Climbing Stairs

- Decode Ways

- Stack

`- Valid Parentheses`

- Merge Intervals

- Insert Interval

- Recursion

`- Merge Two Sorted Lists`

- Search in Rotated Sorted Array

- Combination Sum

- Decode Ways

- Priority Queue (heap)

`- Merge k Sorted Lists`

- Divide & Conquer

`- Merge k Sorted Lists`

- Maximum Subarray

- Binary Search

`- Search in Rotated Sorted Array`

- Matrix

`- Rotate Image`

- Spiral Matrix

- Unique Paths

- Set Matrix Zeroes

- Word Search

- Backtracking

`- Word Search`

- Tree Traversal

`- Validate Binary Search Tree`

To be honest, no relationship stands out right away, but after looking into it, you can see that

- sliding window problem requires some sort of two-pointer (since it’s constantly moving and we need to keep track of the window)
- maze type of problem requires backtracking
- When something requires “building up from simpler, smaller problems”, it probably uses dynamic programming
- If you need to track something, whether it’s the location of certain element, the count of some letters, or existence of certain element, use a hash table (dict) to keep track of it
- If there are multiple elements that require operations and you realize you can do 2 of them at a time, it’s possible you can use a divide and conquer method

As we reach the 1/3 benchmark, it’s a good time to go back and review what we have done so far. Practice makes perfect, and practice takes several goes before we can master a problem.

Next time, we will continue with the next problem: 100. Same Tree

*Buy my a coffee: **https://www.buymeacoffee.com/jonathanckz*