
Count the number of set bits in an integer using bit manipulation, implementing the n & (n-1) technique, with practical examples and code.
Use xor properties to find the missing number in a range by canceling pairs; compute xor of 0..n and xor with all given numbers to reveal the missing value.
Learn to reverse a 32-bit integer using bit masks and shifting in stages, from 8-bit granularity down to 1-bit, with code demonstrations and test results.
Learn to add two integers without plus or minus using bit manipulation. Use xor for the sum and left shift for the carry, looping until carry is zero.
Use a hash map to find two numbers that sum to the target. For each x, check if target minus x exists in the map and return the indices.
Determine the maximum profit from a stock price list by tracking buy and sell values, updating daily, and returning the highest achievable profit.
Learn to detect duplicates in a list with a hash set, tracking seen elements, inserting new ones, and returning true when a value repeats (as in 2,7,2,4).
Compute a product array where each element equals the product of all other elements in the input list, using prefix and suffix products initialized to one, with 32-bit integer results.
Learn to compute the maximum weighted subarray of a continuous integer list by tracking local and global sums, choosing when to start a new sublist or extend the previous one.
Maintain both the current maximum and minimum products to handle negative numbers, choosing between standalone and extended subarrays as you iterate, and track a maximum initialized from the first element.
Find the minimum in a rotated sorted array using exclusive binary search with left and right pointers, comparing mid with right to shrink the search until left points to minimum.
Learn to search for a target in a rotated sorted array using a modified binary search that identifies a linear portion and narrows to the relevant half.
Sort the array, fix a z, and use two pointers to find x and y that sum to -z. Eliminate duplicates to produce all unique triplets that add to zero.
Use a two-pointer approach on edge heights to maximize trapped water. Move the shorter edge inward, compute area as min(height[start], height[end]) times distance, and keep the running maximum.
Explore how to identify the longest substring with unique characters in a string by using a pointer and a map to track indices and update the length when repetitions occur.
Learn how to maximize the length of a window with unique characters by using two pointers and up to k replacements, tracking the max frequency to drive transformations.
Identify the minimum window substring of s that contains all characters of t using a frequency map, two pointers, and a sliding window.
Determine if two words are anagrams by using a 26-letter lowercase frequency vector: increment for the first string, decrement for the second, and check that all frequencies are zero.
Group anagrams by creating a 26-letter frequency vector and converting it into a mask. Build a map from masks to words and output the grouped anagrams.
Learn to validate strings containing parentheses, curly braces, and brackets by using a stack to ensure every opening symbol has a corresponding closing symbol in proper order.
Use a two-pointer approach to check if a string is a palindrome by skipping non-alphanumeric characters, converting capitals to lowercase, and comparing alphanumeric characters from both ends.
Expand around centers using two pointers to find the longest palindromic substring, covering both odd and even length cases. Track the maximum length and the starting index as you expand.
Count palindromic substrings by fixing the first and second indices to generate substrings, check each with a two-pointer palindrome test, and accumulate the total, shown as seven.
Learn an encoding scheme that prefixes each string by its length and a delimiter, concatenates strings, and decodes by reading lengths with a pointer to recover strings.
learn to reverse a linked list using three pointers—previous, current, and next—via an iterative algorithm that inverts links from head to tail and outputs the reversed sequence.
Determine whether a linked list has a cycle using two pointers, where the fast pointer moves twice as fast as the slow pointer. Confirm a cycle when they meet.
Merge two sorted linked lists using two pointers and a recursive approach, selecting the smallest current node and attaching the rest, while handling base cases when a list ends.
Merge k sorted lists into a single linked list by inserting each head into a priority queue and repeatedly popping the smallest element, then pushing its next node.
Learn to remove the nth node from the end of a linked list by measuring length, locating the predecessor, and updating the next pointer when length equals n.
Split the list with slow and fast pointers, reverse the second half, and merge the halves to reorder as first, last, second, second last, and so on (e.g., 1,5,2,4,3).
Determine the maximum depth of a binary tree by recursively calculating left and right depths, using the maximum of the two and adding one for each level.
Explore how to check if two trees are identical using a similarity utility. Compare root values, then recursively verify left and right subtrees to confirm equivalence.
Learn to invert a binary tree using recursion: recursively invert the left and right subtrees, then swap the left and right children at each node to produce the inverted tree.
Compute the binary tree maximum path sum by evaluating paths that include the root and optionally both left and right subtrees, discarding negative sums and updating a global best.
Perform a level order traversal of a binary tree using a queue to process levels, a breadth-first search approach. Enqueue the root, track level size, and enqueue its children.
Learn to serialize and deserialize a binary tree using in-order traversal, marking null pointers with hashes, and decode using left-right node reconstruction.
Discover how to determine if one tree is a subtree of another by matching node values and recursively validating left and right subtrees at each node.
Construct a binary tree from preorder and inorder traversals by selecting the preorder root, locating it in inorder to split left and right subtrees, and recursively building each subtree.
Learn how to build a binary search tree by inserting values with left or right rules, and verify its validity by an inorder traversal that yields a sorted sequence.
Find the kth smallest element in a BST with an iterative in-order traversal. Use a stack and a pointer to traverse left, visit nodes, then right, decrementing k until zero.
Find the lowest common ancestor in a binary search tree by comparing two nodes with the current root and using recursion to go left, right, or return the root.
Learn to implement a trie (prefix tree) with 26 lowercase children, supporting insert, search, and starts-with, using an is-word flag and character-based traversal.
Learn to implement a trie to insert and search words, using 26-branch nodes and an is_word flag, and extend search with a dot wildcard via DFS.
Explore solving the word search ii problem by building a trie from the given words and performing dfs from every grid cell to locate and record present words.
Propagate zeros in a matrix by marking rows and columns to zero with reference vectors or the top row and left column as references, then apply zeros.
Traverse a matrix in spiral order by cycling right, down, left, and up, while updating top, bottom, left, and right limits to form a spiral and collect the result vector.
Practice solving word search with depth-first search on a character grid by exploring four directions from each cell, using boundary checks, visited marking, and backtracking to match the target word.
Master the clone graph problem by traversing a graph, creating replica nodes, and using a map to link originals to their clones, preserving adjacency lists.
Detect cycles in course prerequisites using a breadth-first topological sort on an in-degree graph, scheduling zero-degree courses and relaxing edges until all courses are processed.
Learn to identify cells that can reach both Pacific and Atlantic oceans in a height grid by performing depth-first search from the ocean edges, marking reachable cells, and intersecting results.
Identify and count islands in a binary grid by using depth-first search to mark connected ones as zeros and increment a counter for each new island.
Learn to find the longest consecutive sequence by inserting all numbers into a set and, for each starter with no next element, counting backward to extend the run.
Derive the alien alphabet from a word list by comparing adjacent words to form precedence edges, build a graph, and topologically sort to output w e r t f.
Use a disjoint set with a parent vector to process edges and detect cycles; if any edge links already connected nodes, the graph is not a tree.
Apply a disjoint-set union-find approach to count connected components in an undirected graph by uniting edges and tracking component counts among nodes.
Explore the classic climb-stairs problem: count ways to reach the top by one or two steps using a dynamic programming recurrence f(n)=f(n-1)+f(n-2) with base cases f(0)=1 and f(1)=2.
Discover how to minimize coins for a target using unlimited denominations by sorting coins descending, exploring recursive decisions, and memoizing DP results like a knapsack problem.
Learn to compute the longest increasing subsequence from a list using a dp vector and nested loops, updating ending-at-index values, with the example 0,1,2,3 yielding length four.
discover how to compute the longest common subsequence using a recursive search over two indices, handle matches, branch on non matches, and optimize with a 2d memory memoization table.
Explore the word break problem by using a dictionary set, backtracking with index-based substring checks, and memoization to convert a string into dictionary words, illustrating a path to dynamic programming.
Count combinations that sum to a target using recursion and memoization. See an example with target four and numbers 1–6, revealing seven combinations and memoized paths.
master the house robber problem: maximize money from non-consecutive houses by either robbing current house (plus best up to i-2) or skipping it (best up to i-1) with dynamic programming.
Explore house robber II by linearizing the circular houses into two cases—rob the first house or skip it—and solve each with dynamic programming, building on the house robber I approach.
Explore decoding a numeric string into letters by grouping digits as single or valid two-digit pairs, with zero handling, and apply memoization to count all possible decodings.
Demonstrate counting unique paths in a grid by dynamic programming: set the top row and left column to one, then dp[i][j] = dp[i-1][j] + dp[i][j-1].
Explore the jump game problem: determine if you can reach the last index by tracking the farthest reachable position as you iterate, updating with each index’s jump length.
Develops the top k frequent elements solution by building a frequency map, inserting (element, frequency) pairs into a max-heap, and popping k times to return the most frequent values.
Find the median of a data stream by using two heaps, a max heap for smaller elements and a min heap for larger elements, balancing sizes.
Are you aspiring to master algorithms and data structures but unsure how to find the best, curated problems?
Welcome to Blind 75! This course is designed to help you build solid programming foundations with C++, focusing on logic, algorithms, and data structures. You'll benefit from a carefully curated list of logical challenges that bridge theory and practical coding every single day.
This course also includes the Blind-75 — a collection of problems selected by a Meta engineer in 2018, widely regarded as an excellent starting point for algorithms and data structures practice on LeetCode.
Course Highlights:
Lecture Format: Each session begins with concept discussions and evolves into hands-on coding in C++, guiding you towards optimized solutions.
Downloadable Source Code: Get access to C++ source code for every lecture.
What You’ll Learn:
Data Structures in C++
List-based structures: Array, Matrix, Interval, String, and Bits
Node-based structures: Linked List, Tree, Heap, and Graph
Dynamic Programming Techniques
Problem Types
Traversal, transformation, and searching
Counting, gauging, and verification
Linking, optimization, and path selection
Interval merging and insertions
Problem links are available in the resources section for easy access.
Embrace this journey to mastering algorithms and data structures—happy learning, and keep coding with confidence and curiosity!