Count Total Unique Binary Search Trees - The nth Catalan Number (Dynamic Programming)

Back To Back SWE · Beginner ·⚡ Algorithms & Data Structures ·7y ago

Key Takeaways

The video demonstrates how to calculate the nth Catalan Number, which represents the number of structurally unique binary search trees that can be constructed from a set of numbers from 1 to n, using dynamic programming techniques such as memoization and subproblems.

Full Transcript

all right so today's question investigates when we're given a number n how many structurally unique binary search trees can we construct from the set of numbers from 1 to n so if n is 3 I'm only going to get the numbers 1 2 & 3 how many structurally unique binary search trees can I create with the numbers 1 2 & 3 3 nodes numbers one two and three again binary search trees everything on our left subtree is going to have to be less than the node we're sitting at everything in our right subtree is going to have to be greater than the node we're sitting at so why is this important this is actually a very important sequence in combinatorics and these set of numbers that this problem produces from its input of n forms the cattle and sequence or what's called the Catalan numbers and these are actually very useful in combinatorics I'll link below if you want to learn more about that but let's see how we can approach this question and I really want you to see the approach that I wanted to remind to be jumping to when we're approaching this problem and then we'll go over some formulas and terminology so that we can tackle this problem all right so now I want us to go through expansively going through a possibility set give it N equals 2 and our little bubble here we are able to use the numbers 1 where we'll choose the number 2 so we're going to have 2 nodes so my first choice is I need to choose a root number when I choose 1 as the roots this is what happens so when I choose 1 as the root I cannot have anything on the left because I can't put 2 on the left my bubble my realm of possibilities to put in the left subtree of 1 is none based on our possibility set we can't have anything in this left subtree and we've expanded all possibilities here but here now we have the possibility space of putting a 2 here so what materializes from this is we're going to be able to create ones tree so what is that tree so what materialized from that ability space was we put the one here and then we have a cloud of two and then we can place the two so this is if we choose one as the route we've expressed all possibilities of placements if we do one is the route with one as the route we can generate one tree it's right there and notice how when we go this way to go greater and value it's a binary search tree maintain those properties so we got one tree from planting one as the roots let's plant to as the root so we plant to as the root so what is going to happen what is going to be the branching of possibilities in our sub trees this is what the possibility clouds will look like and now we have a two rooted and this this expression right here expresses all the possibilities with two at the root all we can do is place the one in the right subtree and the left subtree has no possibilities to expand so now this is what we get so this is our answer this is the only structural unique binary search tree we can make given the numbers 1 & 2 if we plant two at the root and now we have another tree a notice that's our answer our answer is two the answer for the second Catalan number is going to be two because we can generate two structurally unique binary search trees so now let's expand our pool and let's expand to the number three and see how that changes how we do things so now n is three and I have the three numbers one two and three I can plant each at the root of my binary search tree and then I know the possibility spaces that will result from that choice so we choose one as the root and let's see what happens we chose one and an expression of all of the possibility space if I choose one I have a cloud here where I can put two or three at this node I can choose either because I will maintain the binary search tree property if I go right I can choose either of those at this node there is nothing choose there I cannot go lesser in value because the sequence starts at one so if I place with one at the root this is my new possibility space and notice I have two choices from here what do I do I will materialize both of those choices I really yield to trees from this so let's see what happens and now we have materialized this possibility space we have expressed both choices of two and three at that node and therefore we have maintained our BST property and I yield two trees from a placement of one at the root so now let's place two at the root and now I have placed two at the roots I have a one on the left and I need to express all of those possibilities and I have a three on the right so now what I do is I materialize those possibilities at each of these places we only can make one choice so I will materialize only one possibility from this so now all I can do is materialize this all I can do is get a to planted at the root and have a one on the left and may three on the right and now with two rooted at the root I know that I will yield one tree so now let's reach three at the roots and now I have put three at the roots notice my right subtree has no things I can put in it I'm going from 1 to 3 I do not have any choices for that node right there but for this node I can choose the 1 or the 2 so let's materialize each possibility so now I see when I have 3 rooted at the roots of a tree where I can use 3 nodes I know the answer is I can generate tune structurally unique binary search trees and now and now you see we have 5 and notice each of these are subproblems and when we see subproblems what does that remind me of what does that make me think it makes me think I can save answers I can use dynamic programming that is why this question turns out to be dynamic programming because each of these is a sub problem this sub problems answer is to what was the question if I plant one at the root and I have three nodes going from one to three what is the answer to if I plate to at the root and I have three nodes what is the answer one if I place three at the root and I have three knows what is the answer to so we are going to be sub probably down and to answer the nth Catalan number we are going to be building up our answers remembering past answers and then we are going to build up to a greater solution so now let's go into how we do that so we started our understanding at intuition so we knew a binary search tree works we knew when we place an element at the roots we're going to narrow how we can build trees so now let's formalize our ideas into equations so that we can understand mathematically how these subproblems are late so first let's define something so now let's define G of M so G of n is going to be the formula for the nth Catalan number it is the original question we are asked given numbers 1 to n how many structurally unique binary search trees can we build this is the overall question I can place one at the root I can place two or three I can place three at the root if n is three it is giving us from one to M so now let's define another equation that helps us understand what G of n means so now let's define the function f of I and M so with I at the root and n nodes available how many structurally unique binary search trees 10 I built so the answer to G of n is the sum if I plant V 1 V 2 V 3 and up to N at the root so if G is 3 I have 1 2 and 3 to work I can plant one at the root I can plant two at the root I can plant 3 at the root at each time I have three nodes total to work with so the answer to G of 3 is going to be the sum between these three plantings when we plant the 1 the 2 and 3 and explore all of those possibilities so how does this break down what does this look like as we build our possibilities through the tree so now this is what the breakdown looks like we're not changing anything we did this is exactly what we did before we have G of 3 our original question is for the third Catalan number so we plant one we plant - and we plant 3 but then what are the left and right subtrees what is their possibility space after we make this choice so now let's express that so this is a huge mental leap I need you to make so when we go left here when we plant one at the reach we can have nothing in the left subtree all the expressions are going to be G of 0 will have zero nodes to work with in this subtree we will have two nodes will have the two at the 3 to work with so therefore the amount of ways we can go from here is G of two we have two nodes we need all the unique placements within that subtree and that is going to express all of this and notice this continues to branch down we solve G OH - bison breaking it down here so we're going to solve this by breaking it down again into summations so moving on we know we can use the one in the left subtree if we plant two at the roots we know we can use three and the right subtree if we plant two at the root we have one node to work with G of one one node to work with G of one and then if we plant three at the root we have two nodes to work with in the left subtree one in two and we have zero nodes to work with in the right subtree because three is the maximum we only have three nodes one two three so now these are the key equations and guess what we already know the answer to G of zero just one we already know the answer to G of one it's just going to be one so this is how we subproblems breakdown and it yields us a key equation that brings us straight to coding it so finally this is how we do our dynamic programming the code is in the description now the code will make sense and you can see how the subproblems relate the answer to F planting at I on the root and having n nodes available the answer is the product this is actually called the Cartesian product because we are taking all of the cross-sections between two possibility spaces two possibility spaces we take the Cartesian product between them and what happens is we take the product between G of I minus 1 which we just take 1 minus 1 and we get 0 and then and - I if n is 3 and I subtract 1 from 3 I have 2 left so now G of 2 so all this is doing is saying left subtree possibilities right subtree possibilities multiply them to take all the cross section between the possibilities and that gives us all of these structurally unique binary search trees we can build given that we rooted at this specific element this is the final intellectual jump you need to make to fully understand this problem and how the dynamic programming gives us the answer to this global solution this is the bigger picture of this question so if I plant a 2 at the root and N equals 3 I play it into 2 at the root the reason I subtract 1 is because I can go from 1 up to the 2 minus 1 because we're going to the left it's a binary search tree we need to go down in value and if I go to the right we subtract from our upper bound we know that and minus the 2 is going to yield us the amount of nodes we can work in the right subtree because that gives our us our upper bound our right bound so now that we see the bigger picture and again you don't need to immediately internalize this but this is the bigger picture I want you to understand let's look the time and space complexity to this solution so we're going to let n be the input n and the time complexity is going to be Big O of N squared but don't ever be fooled when you ce o-- of N squared that does not mean for every single n we do n iterations the thing is it might be a triangular sort of work when we drop a constant maybe it's like 1/2 N squared there's a much more detailed and mathematical analysis of the time in the description below provided by Li code I don't want to go into it here because I probably explained it wrong but our time complexity is going to round to N squared and then our space complexity is going to be linear we are going to be storing the solution to n plus 1 subproblems if you count the 0 with subproblem if you don't we're just starting and subproblems either way it does not matter we will scale in a linear fashion as the input size the n gets arbitrarily large for this problem so these are the time and space complexities if this video helped you if this was a clear explanation subscribe to the channel and like this video these are for you to prepare for the software engineering interview and to just excel in it and do well so subscribe to the channel like the video and [Music]

Original Description

Free 5-Day Mini-Course: https://backtobackswe.com Try Our Full Platform: https://backtobackswe.com/pricing 📹 Intuitive Video Explanations 🏃 Run Code As You Learn 💾 Save Progress ❓New Unseen Questions 🔎 Get All Solutions Question: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Catalan Numbers: https://en.wikipedia.org/wiki/Catalan_number Define G(n): the number of unique BST for a sequence of length n. G(0) = 1 G(1) = 1 For each element, we can place it and recurse on the left an right not including that number we choose to root that subtree. Define F(i,n): the number of unique BST, where the number i is served as the root of BST (1 is less than or equal to i which is less than or equal to n). G(n) = the summation from 1 to n of F(i, n) When we choose an element to root a subtree from the possible elements to root there, we split the possibilities into a left and a right of the original enumeration. Example: n = 5 aka [1, 2, 3, 4, 5] When evaluating F(3, 5) we will have a left subtree with [1, 2] aka G(2) a right subtree with [4, 5] aka G(2) G(n) evaluates the # of unique trees we can construct from a total of n possible values, regardless of what those values are. The Realization We notice that F(i, n) = G(i - 1) * G(n - i) To get F(i, n) we are considering all combinations of left tree possibilities with all of the right tree possibilities. These exhaustive pairings between two sets of items is called a cartesian product. Now we have a new way to express F(i, n) F(i, n) = G(i - 1) * G(n - i) G(n) = summation from 1 to n of G(i - 1) * G(n - i) This now can be solved with DP via top-down recursion or bottom up. For each G(n) up to our requested n we will solve the G(n) summation equation. At the end we return the G(n) requested which by the end we will have an answer for. ++++++++++++++++++++++++++++++++++++++++++++++++++ HackerRank: https://www.youtube.com/channel/UCOf7UPMHBjAavgD
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Back To Back SWE · Back To Back SWE · 27 of 60

1 4 Tips To Learn Java Programming As Fast As Possible As A Beginner
4 Tips To Learn Java Programming As Fast As Possible As A Beginner
Back To Back SWE
2 3 Mistakes Beginners Make When First Learning Java and Android Development
3 Mistakes Beginners Make When First Learning Java and Android Development
Back To Back SWE
3 How To Get A Job At Google | The Ultimate Guide To Algorithmic/Coding Interviews
How To Get A Job At Google | The Ultimate Guide To Algorithmic/Coding Interviews
Back To Back SWE
4 The Ultimate Big O Notation Tutorial (Time & Space Complexity For Algorithms)
The Ultimate Big O Notation Tutorial (Time & Space Complexity For Algorithms)
Back To Back SWE
5 Total Occurrences Of K In A Sorted Array (Facebook Software Engineering Interview Question)
Total Occurrences Of K In A Sorted Array (Facebook Software Engineering Interview Question)
Back To Back SWE
6 The N Queens Problem using Backtracking/Recursion - Explained
The N Queens Problem using Backtracking/Recursion - Explained
Back To Back SWE
7 Compute All Mnemonics For A Phone Number (Recursion/Backtracking Problem)
Compute All Mnemonics For A Phone Number (Recursion/Backtracking Problem)
Back To Back SWE
8 How To Reverse A Singly Linked List | The Ultimate Explanation (Iteratively & Recursively)
How To Reverse A Singly Linked List | The Ultimate Explanation (Iteratively & Recursively)
Back To Back SWE
9 Depth First & Breadth First Graph Search - DFS & BFS Graph Searching Algorithms
Depth First & Breadth First Graph Search - DFS & BFS Graph Searching Algorithms
Back To Back SWE
10 The 0/1 Knapsack Problem (Demystifying Dynamic Programming)
The 0/1 Knapsack Problem (Demystifying Dynamic Programming)
Back To Back SWE
11 The Dutch National Flag Problem (The Quicksort "Band-Aid")
The Dutch National Flag Problem (The Quicksort "Band-Aid")
Back To Back SWE
12 Test If A Binary Tree Is Symmetric ("Symmetric Tree" on Leetcode)
Test If A Binary Tree Is Symmetric ("Symmetric Tree" on Leetcode)
Back To Back SWE
13 The IP Address Decomposition Problem - Compute All Valid IP Addresses From Raw IP String
The IP Address Decomposition Problem - Compute All Valid IP Addresses From Raw IP String
Back To Back SWE
14 How To Permute A String - Generate All Permutations Of A String
How To Permute A String - Generate All Permutations Of A String
Back To Back SWE
15 The Balanced Parentheses Problem - Classic Stack Problem ("Valid Parentheses" on Leetcode)
The Balanced Parentheses Problem - Classic Stack Problem ("Valid Parentheses" on Leetcode)
Back To Back SWE
16 Knuth–Morris–Pratt (KMP) Pattern Matching Substring Search -  First Occurrence Of Substring
Knuth–Morris–Pratt (KMP) Pattern Matching Substring Search - First Occurrence Of Substring
Back To Back SWE
17 Implement An LRU Cache - The LRU Cache Eviction Policy ("LRU Cache" on LeetCode)
Implement An LRU Cache - The LRU Cache Eviction Policy ("LRU Cache" on LeetCode)
Back To Back SWE
18 Find The Longest Increasing Subsequence - Dynamic Programming Fundamentals
Find The Longest Increasing Subsequence - Dynamic Programming Fundamentals
Back To Back SWE
19 Generate All Palindromic Decompositions Of A String ("Palindrome Partitioning" on Leetcode)
Generate All Palindromic Decompositions Of A String ("Palindrome Partitioning" on Leetcode)
Back To Back SWE
20 Implement A Sudoku Solver - Sudoku Solving Backtracking Algorithm ("Sudoku Solver" on LeetCode)
Implement A Sudoku Solver - Sudoku Solving Backtracking Algorithm ("Sudoku Solver" on LeetCode)
Back To Back SWE
21 Merge K Sorted Arrays - Min Heap Algorithm ("Merge K Sorted Lists" on LeetCode)
Merge K Sorted Arrays - Min Heap Algorithm ("Merge K Sorted Lists" on LeetCode)
Back To Back SWE
22 Partition To K Equal Sum Subsets From An Array of Integers - The Backtracking Approach
Partition To K Equal Sum Subsets From An Array of Integers - The Backtracking Approach
Back To Back SWE
23 Edit Distance Between 2 Strings - The Levenshtein Distance ("Edit Distance" on LeetCode)
Edit Distance Between 2 Strings - The Levenshtein Distance ("Edit Distance" on LeetCode)
Back To Back SWE
24 Total Ways To Decode A String - Recursive Dynamic Programming Approach ("Decode Ways" on LeetCode)
Total Ways To Decode A String - Recursive Dynamic Programming Approach ("Decode Ways" on LeetCode)
Back To Back SWE
25 The Change Making Problem - Fewest Coins To Make Change Dynamic Programming
The Change Making Problem - Fewest Coins To Make Change Dynamic Programming
Back To Back SWE
26 Compute The Next Permutation of A Numeric Sequence - Case Analysis ("Next Permutation" on Leetcode)
Compute The Next Permutation of A Numeric Sequence - Case Analysis ("Next Permutation" on Leetcode)
Back To Back SWE
Count Total Unique Binary Search Trees - The nth Catalan Number (Dynamic Programming)
Count Total Unique Binary Search Trees - The nth Catalan Number (Dynamic Programming)
Back To Back SWE
28 Generate All Strings With n Matched Parentheses - Backtracking ("Generate Parentheses" on LeetCode)
Generate All Strings With n Matched Parentheses - Backtracking ("Generate Parentheses" on LeetCode)
Back To Back SWE
29 Implement A Max Stack - A Stack With A .max() API (Similar To "Min Stack" on LeetCode)
Implement A Max Stack - A Stack With A .max() API (Similar To "Min Stack" on LeetCode)
Back To Back SWE
30 The Recursive Staircase - Top Down & Bottom Up Dynamic Programming ("Climbing Stairs" on LeetCode)
The Recursive Staircase - Top Down & Bottom Up Dynamic Programming ("Climbing Stairs" on LeetCode)
Back To Back SWE
31 Search A Maze For Any Path - Depth First Search Fundamentals (Similar To "The Maze" on Leetcode)
Search A Maze For Any Path - Depth First Search Fundamentals (Similar To "The Maze" on Leetcode)
Back To Back SWE
32 Total Unique Ways To Make Change - Dynamic Programming ("Coin Change 2" on LeetCode)
Total Unique Ways To Make Change - Dynamic Programming ("Coin Change 2" on LeetCode)
Back To Back SWE
33 Test If A Binary Tree Is Height Balanced ("Balanced Binary Tree" on LeetCode)
Test If A Binary Tree Is Height Balanced ("Balanced Binary Tree" on LeetCode)
Back To Back SWE
34 Find The Second Largest Item - Heap & Tracking Approach (Beginner Big N Interview Question)
Find The Second Largest Item - Heap & Tracking Approach (Beginner Big N Interview Question)
Back To Back SWE
35 Increment An Integer Represented As An Array ("Plus One" on LeetCode)
Increment An Integer Represented As An Array ("Plus One" on LeetCode)
Back To Back SWE
36 Merge 2 Sorted Lists - A Fundamental Merge Sort Subroutine ("Merge Two Sorted Lists" on LeetCode)
Merge 2 Sorted Lists - A Fundamental Merge Sort Subroutine ("Merge Two Sorted Lists" on LeetCode)
Back To Back SWE
37 Clone An Undirected Graph - The Utility of Hashtable Mappings ("Clone Graph" on Leetcode)
Clone An Undirected Graph - The Utility of Hashtable Mappings ("Clone Graph" on Leetcode)
Back To Back SWE
38 Clone A Linked List (With Random Pointers) - Linear Space Solution & Tricky Constant Space Solution
Clone A Linked List (With Random Pointers) - Linear Space Solution & Tricky Constant Space Solution
Back To Back SWE
39 Deeply Understanding Logarithms In Time Complexities & Their Role In Computer Science
Deeply Understanding Logarithms In Time Complexities & Their Role In Computer Science
Back To Back SWE
40 Implement A Binary Heap - An Efficient Implementation of The Priority Queue ADT (Abstract Data Type)
Implement A Binary Heap - An Efficient Implementation of The Priority Queue ADT (Abstract Data Type)
Back To Back SWE
41 Max Contiguous Subarray Sum - Cubic Time To Kadane's Algorithm ("Maximum Subarray" on LeetCode)
Max Contiguous Subarray Sum - Cubic Time To Kadane's Algorithm ("Maximum Subarray" on LeetCode)
Back To Back SWE
42 Binary Tree Bootcamp: Full, Complete, & Perfect Trees. Preorder, Inorder, & Postorder Traversal.
Binary Tree Bootcamp: Full, Complete, & Perfect Trees. Preorder, Inorder, & Postorder Traversal.
Back To Back SWE
43 What Is Asymptotic Analysis? And Why Does It Matter? A Deeper Understanding of Asymptotic Notation.
What Is Asymptotic Analysis? And Why Does It Matter? A Deeper Understanding of Asymptotic Notation.
Back To Back SWE
44 An In-Depth Algorithmic Analysis of Bubble Sort. Best Case, Average Case, & Worst Case.
An In-Depth Algorithmic Analysis of Bubble Sort. Best Case, Average Case, & Worst Case.
Back To Back SWE
45 Maximum Sum Rectangle In A 2D Matrix - Kadane's Algorithm Applications (Dynamic Programming)
Maximum Sum Rectangle In A 2D Matrix - Kadane's Algorithm Applications (Dynamic Programming)
Back To Back SWE
46 A Detailed Algorithmic Analysis of Insertion Sort. Best Case & Worst Case.
A Detailed Algorithmic Analysis of Insertion Sort. Best Case & Worst Case.
Back To Back SWE
47 Binary Tree Level Order Traversal - Drawing The Parallel Between Trees & Graphs
Binary Tree Level Order Traversal - Drawing The Parallel Between Trees & Graphs
Back To Back SWE
48 Implement A Queue Using Stacks - The Queue ADT ("Implement Queue Using Stacks" on LeetCode)
Implement A Queue Using Stacks - The Queue ADT ("Implement Queue Using Stacks" on LeetCode)
Back To Back SWE
49 All Nodes Distance K In A Binary Tree - Performing Bidirectional Search On A Tree Using A Hashtable
All Nodes Distance K In A Binary Tree - Performing Bidirectional Search On A Tree Using A Hashtable
Back To Back SWE
50 Longest Common Subsequence (2 Strings) - Dynamic Programming & Competing Subproblems
Longest Common Subsequence (2 Strings) - Dynamic Programming & Competing Subproblems
Back To Back SWE
51 Egg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem Decomposition
Egg Dropping Problem: Dynamic Programming Fundamentals & Understanding Subproblem Decomposition
Back To Back SWE
52 Minimum Window Substring: Utilizing Two Pointers & Tracking Character Mappings With A Hashtable
Minimum Window Substring: Utilizing Two Pointers & Tracking Character Mappings With A Hashtable
Back To Back SWE
53 Reverse Polish Notation: Types of Mathematical Notations & Using A Stack To Solve RPN Expressions
Reverse Polish Notation: Types of Mathematical Notations & Using A Stack To Solve RPN Expressions
Back To Back SWE
54 Asymptotic Notations 101: Big O, Big Omega, & Theta (Asymptotic Analysis Bootcamp)
Asymptotic Notations 101: Big O, Big Omega, & Theta (Asymptotic Analysis Bootcamp)
Back To Back SWE
55 The Backtracking Blueprint: The Legendary 3 Keys To Backtracking Algorithms
The Backtracking Blueprint: The Legendary 3 Keys To Backtracking Algorithms
Back To Back SWE
56 Fast Multiplication: From Grade-School Multiplication To Karatsuba's Algorithm
Fast Multiplication: From Grade-School Multiplication To Karatsuba's Algorithm
Back To Back SWE
57 Search A 2D Sorted Matrix - Fundamentals of Search Space Reduction
Search A 2D Sorted Matrix - Fundamentals of Search Space Reduction
Back To Back SWE
58 The Quicksort Sorting Algorithm: Pick A Pivot, Partition, & Recurse
The Quicksort Sorting Algorithm: Pick A Pivot, Partition, & Recurse
Back To Back SWE
59 Lowest Common Ancestor Between 2 Binary Tree Nodes (A Recursive Approach)
Lowest Common Ancestor Between 2 Binary Tree Nodes (A Recursive Approach)
Back To Back SWE
60 Sort A K Sorted Array - Investigating Applications of Min/Max Heaps
Sort A K Sorted Array - Investigating Applications of Min/Max Heaps
Back To Back SWE

This video teaches how to calculate the nth Catalan Number using dynamic programming, which is essential in combinatorics and computer science. The lesson covers the definition of Catalan numbers, the properties of binary search trees, and how to use dynamic programming to solve the problem.

Key Takeaways
  1. Choose a root number from the set of numbers from 1 to n
  2. Expand the possibility space by choosing a left and right subtree for the root number
  3. Maintain the binary search tree property
  4. Materialize possibilities at each node
  5. Use dynamic programming to solve the problem
  6. Define G(n) and f(i, n) functions
  7. Break down the problem into subproblems
  8. Plant nodes at the root
  9. Explore all possibilities through the tree
  10. Calculate the Cartesian product of the left and right subtree possibilities
💡 The nth Catalan Number can be calculated using dynamic programming by breaking down the problem into smaller subproblems, which reduces the time complexity to O(n) and space complexity to O(n)

Related AI Lessons

Bloom Filters, Explained Properly
Learn how Bloom filters work and their benefits, including tiny memory and blazing speed, in exchange for potential false positives.
Dev.to · Daksh Gargas
Prefix Sums: The Preprocessing Trick That Makes Range Queries Instant
Learn how prefix sums enable instant range queries in arrays, boosting performance in various applications
Medium · Programming
I Thought I Was Ready for the Interview — Then One Simple Math Question Destroyed Me
A simple math question can destroy a developer's interview, highlighting the importance of being prepared for unexpected questions
Medium · Programming
Week 2(Day 10): LeetCode Two Pointers(slow & fast): Remove Duplicates from Sorted Array (Brute…
Learn to remove duplicates from a sorted array using the two pointers technique, improving from brute force to optimized solutions
Medium · Python
Up next
Stump Grinder Carbide Wheel Grinds Hardwood To Chips
Innoforge Studio
Watch →