shallow focus photography of pitcher

Heap Algorithm Summaries

Here are the summaries for the Heap algorithms in Leetcode’s Blind 75. A Binary Heap is a type of Binary Tree, specifically a complete Binary Tree (where all levels are filled except the lowest level), which is used to store data efficiently to get the max or min element based on its type. Merge K Sorted Lists This was already included in the List topic. Top K Frequent Elements Given an integer array nums of length n and an integer k, return the k most frequent elements. ...

December 22, 2024 · 2 min
a large wave is breaking over the ocean

Dynamic Algorithm Summaries

Here are the summaries for the Dynamic algorithms in Leetcode’s Blind 75. Dynamic programming is a method used to solve complex problems by breaking them down into simpler subproblems. Unlike the other categories I have for the Blind 75, this is not a data structure, but more about the types of solutions that work well with them. Climbing Stairs Given an integer representing the number of stairs, calculate how many ways the stairs can be climbed by taking 1 or 2 steps at a time. ...

October 21, 2024 · 6 min
red and brown leafy tree at daytime

Tree Algorithm Summaries

Here are the summaries for the Tree algorithms in Leetcode’s Blind 75. A tree is a subset of graph data structures where nodes are organized hierarchically. Many of these problems specifically use a binary tree in which each node can have a maximum of two child nodes, a left child node and a right child node. Maximum Depth of Binary Tree Given the root of a binary tree, find the max depth of the tree from the root. ...

October 4, 2024 · 9 min
open book lot

String Algorithm Summaries

Here are the summaries for the String algorithms in Leetcode’s Blind 75. A String is a sequence of characters used to represent text, usually to make something human-readable. It’s not really a data structure, but can be seen as similar to an array, so the solutions will be similar to those problems. Longest Substring Without Repeating Characters Given a string, find the longest subsequence of characters that doesn’t repeat characters. ...

September 1, 2024 · 8 min
four white, red, and blue vending machines

Matrix Algorithm Summaries

Here are the summaries for the Matrix algorithms in Leetcode’s Blind 75. A matrix is a 2 dimensional data structure consisting of rows and columns. For these problems, the matrix is represented with an array of arrays. Set Matrix Zeroes Given a matrix of integers, size m x n, if an input value is 0, set all values from its row and column to 0 as well. Solution with O(m*n) time / O(1) space ...

August 25, 2024 · 5 min