
This is an introduction of the course
Learn how to invert a binary tree in a leetcode-style question, using a swap-based approach that inverts left and right subtrees and recurses to children.
Explore the two sum brute force approach, using nested loops to find the pair that sums to the target and return their indices, noting its O(n^2) inefficiency.
Learn how to reverse a singly linked list by iterating, using a temporary node, and updating pointers to produce a reversed output.
Explore determining a palindrome in a linked list using two pointers, fast and slow, to the midpoint, and reverse the second half for comparison.
Perform an in-order traversal on a binary tree by visiting the left subtree, then the root, then the right, building a list of node values with a recursive helper function.
Reverse an integer by extracting digits with mod ten, skip leading zeros, build reversed number, and preserve the sign. Use a long variable to detect 32-bit overflow and return zero.
Determine the minimum number of parentheses to add to make a string valid, using counting and stack approaches to balance left and right parentheses.
Rearrange a linked list by grouping nodes at odd positions first, then at even positions. Use pointer manipulation to connect nodes in the correct order.
Use two stacks to simulate backspaces on strings s and t. Then compare the final stacks to determine equality.
Explain and solve a nested list weight sum problem by iterating through each depth level, accumulating integers multiplied by their depth, using a temporary list to manage the next level.
Learn to reverse a string in place by swapping characters in an array using two pointers, start and end, with O(1) memory and no return value.
Sort the nums array, then use a start and end pointer for each i to find the three-number sum closest to target, updating the closest sum by absolute distance.
Explore binary tree pruning by removing subtrees that contain no ones, using depth-first search and recursion to keep only branches with value one.
Solve the hand of straights by using a priority queue to form groups of W consecutive numbers from a sorted array and ensure all cards fit.
Learn a level-order traversal using a queue to process levels from right to left, updating the current node. The final updated node gives the bottom-left value of the last row.
Sort a linked list by inserting each node into a priority queue, then pop nodes in ascending order to build the sorted list.
Explore searching for a target value in a binary search tree and returning the matching subtree root, or null if not found, using recursive left or right traversal.
Discover how to locate the peak index in a mountain array, using a linear scan and a faster binary search with two pointers, achieving O(log n) time.
Calculate the sum of left leaves in a binary tree by adding a left child’s value when it has no children and recursively traversing the left and right subtrees.
Learn to compute the range sum of a binary search tree using recursion, summing node values within a given low and high inclusive range.
Explore solving Leetcode 965 unit value binary tree by building a recursive helper that compares every node to the root value.
Apply topological concepts to the course schedule problem by computing indegree, building an adjacency map of prerequisites, and using a queue to determine if all courses can be completed.
Solve the LeetCode parity II problem using a two-pointer in-place approach, placing even numbers at even indices and odd numbers at odd indices by swapping mismatches.
transpose a matrix by swapping rows and columns to produce an output array with swapped dimensions. use nested loops to copy each a[i][j] into output[j][i] and return the transposed result.
Learn how to reconstruct an itinerary from a list of airline tickets, starting at JFK, and choose the lexicographically smallest valid route using a map, priority queue, and stack technique.
Learn to search a 2d matrix efficiently by treating it as a flattened 1d array and applying binary search to locate the target, including edge cases.
In this lecture, you implement fizz buzz by looping from 1 to n, outputting fizz, buzz, or fizzbuzz when divisible by 3, 5, or both, otherwise number as a string.
Learn to find the max consecutive ones in a binary array using a two-pointer approach, updating the maximum length as you traverse and reset when you hit zero.
Group the input characters into blocks of size k, ignoring dashes, and convert to uppercase. Build the result by inserting dashes while traversing backward, then reverse for correct order.
Convert the linked list to an array, then use a stack to locate the next greater element for each node, producing an output array with zeros where none exists.
Learn to flip a matrix of 0s and 1s by first flipping each row left-to-right and then inverting bits, using a two-pointer approach to handle same and different pairs efficiently.
This course is for all those people who want to learn the basics of data structure and algorithms from the absolute beginner to the Intermediate level. We will use many examples to make the lectures very easy to understand and digest.
You don't really need to have prior knowledge of Data Structure or Algorithm, but a basic prior knowledge of any programming language will be helpful!
After going through these 100 Leetcode questions, you will get your foot wet and start trying some "Medium" questions soon. The purpose of this course is to learn fast and give you the confidence to start working on Leetcode questions.
Most of these LC questions are EASY level or MEDIUM level with a quick solution. You can get the most out of it by following along. Because Medium question is like few Easy questions combined together. A Hard question is a combination of a few Medium questions. In the future, I will try to make a Medium level of Leetcode for all of you!
If you have any questions, please feel free to comment it below. I will get back to you as soon as possible.
If you have any suggestions on me improving the videos and contents, please also let me know, so that I can make better videos in the future. I hope you have a wonderful learning experience here!