Count Unique Binary Search Trees | LeetCode 96 | C++, Java, Python | Catalan Number

  Рет қаралды 8,342

Knowledge Center

Knowledge Center

Күн бұрын

Пікірлер: 22
@OtterD-z3i
@OtterD-z3i Жыл бұрын
Great job man, THANK YOU! This is the clearest explanation I have ever seen!
@ayyappahemanth7134
@ayyappahemanth7134 4 жыл бұрын
Man how did you get that idea of function ! That will take years for me to get that idea!. Kudos man! Great work!
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Thanks!
@praveenj3112
@praveenj3112 4 жыл бұрын
Really good Explanation . Can we solve this problem using Catalan number ? T(n)=2nCn/(n+1);
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Yes.
@pmulchandani96
@pmulchandani96 4 жыл бұрын
This is awesome, I am always finding it difficult to derive the function in such kind of problems. It will be helpful if you can share that how you approach such kind of problems or is this something we can develop gradually by practicing. Any suggestions will be helpful. Thanks!
@ayyappahemanth7134
@ayyappahemanth7134 4 жыл бұрын
I just started for my final year computer science interview sir!. Can you make a video on how to proceed or plan of preparation . Please sir! Your videos are the most valuable to me right now!
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Try to focus on following aspects, see areas need improvement. You may already be good in some of these areas. * Pick a programming languages C++, Java, Python (or any other) - You should know it well. * Study OOPs concepts. * Data Structures and Algorithms (Big O analysis, Recursion, LinkedLists, Hashing, Search Trees, Sorting Algorithms - quick sort, merge sort, heap sort, Binary Search, Graph Algorithms, DP, Tries, Suffix Trees) * Low Level Design - Object-Oriented Analysis and Design * Operating Systems concepts - Multiprocessing, multithreading, deadlocks, scheduling etc. * Computer networks (Good to have) * Basics of Databases - RDBMS (Good to have) * High Level System Design (Nice to have, but not very critical) Note: For Graphs, it's not required to know all the algorithms in detail. A big chunk of problems will involve application of BFS or DFS. So, first have mastery over following, these should be good enough: * Graph Representation: adj. list and adj. matrix * BFS and DFS * Cycle Detection - Directed and Undirected cases * Topological Sort * Shortest Path - Dijkstra & Bellman Ford
@ayyappahemanth7134
@ayyappahemanth7134 4 жыл бұрын
@@KnowledgeCenter Thank you so much sir! Now my to-do list contains everyone you said! Hope I get a nice job during difficult times. Thanks for support in advance!
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
All the Best.
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
For Graphs, it's not required to know all the algorithms in detail. A big chunk of problems will involve application of BFS or DFS. So, first have mastery over following, these should be good enough: * Graph Representation: adj. list and adj. matrix * BFS and DFS * Cycle Detection - Directed and Undirected cases * Topological Sort * Shortest Path - Dijkstra & Bellman Ford
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
@Ayyappa Hemanth: Added Some more info to TODO list.
@kshitijsharma6471
@kshitijsharma6471 4 жыл бұрын
We can also solve using Catalan number (2*n)!/(n+1)!*(n)! Run time is almost same
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
Right.
@kameshkotwani
@kameshkotwani 4 жыл бұрын
lovely.
@mukultaneja7243
@mukultaneja7243 4 жыл бұрын
Thankyou sir for an amazing explanation. Please also tell.....how can we do it by recursion...?????
@dineshchintu9779
@dineshchintu9779 2 жыл бұрын
Thanks man (❁´◡`❁) ! The channel wil reach 100k soon !!
@KnowledgeCenter
@KnowledgeCenter 2 жыл бұрын
Thanks for the best wishes.
@chiragmongia733
@chiragmongia733 4 жыл бұрын
02:55- Can someone please explain this- why have we considered that for zero nodes, there would be 1 combination? Shouldn't it be 0?
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
0 nodes is a possibility. It's not an impossible scenario. e.g., Left subtree or right subtree is Empty is a possible scenario.
Perfect Squares | LeetCode 279 | C++, Java, Python
18:03
Knowledge Center
Рет қаралды 10 М.
Binary Search Tree in Python
22:59
NeuralNine
Рет қаралды 54 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 2,4 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,5 МЛН
Lecture 127: Unique Binary Search Trees || Catalan Number
20:27
CodeHelp - by Babbar
Рет қаралды 46 М.
AVL Trees & Rotations (Self-Balancing Binary Search Trees)
20:38
Back To Back SWE
Рет қаралды 352 М.
Count Complete Tree Nodes | LeetCode 222 | C++, Java, Python
13:57
Knowledge Center
Рет қаралды 8 М.
Learn Binary search trees in 20 minutes 🔍
20:25
Bro Code
Рет қаралды 184 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 674 М.
L53. Largest BST in Binary Tree
17:27
take U forward
Рет қаралды 166 М.
Data structures: Binary Search Tree
19:28
mycodeschool
Рет қаралды 1,3 МЛН
Binary search tree - Implementation in C/C++
18:36
mycodeschool
Рет қаралды 1,3 МЛН