Тёмный
Code Patasala (కోడ్ పాఠశాల)
Code Patasala (కోడ్ పాఠశాల)
Code Patasala (కోడ్ పాఠశాల)
Подписаться

Bringing computer science concepts closer to people

This is the perfect spot for college students eager to conquer computer science and rock placements!

What's in Store?

In-Depth Tutorials: Algorithms, data structures, programming languages.
Real Coding Examples: Practice makes perfect - follow along with our coding demos.
Expert Guidance: Learn from experienced instructors passionate about helping you succeed.


LeetCode 46. Permutations
15:02
2 месяца назад
GFG LeetCode 39. Combination Sum
21:37
2 месяца назад
LeetCode 33. Search in Rotated Sorted Array
14:24
3 месяца назад
LeetCode 994. Rotting Oranges
14:24
3 месяца назад
LeetCode 200. Number of Islands
13:36
3 месяца назад
LeetCode 98. Validate Binary Search Tree
5:40
3 месяца назад
LeetCode 155. Min Stack
6:42
3 месяца назад
LeetCode 238. Product of Array Except Self
14:53
5 месяцев назад
LeetCode 322: Coin Change
21:24
5 месяцев назад
LeetCode 208. Implement Trie (Prefix Tree)
18:56
6 месяцев назад
LeetCode 207. Course Schedule
23:24
7 месяцев назад
LeetCode 150. Evaluate Reverse Polish Notation
15:07
7 месяцев назад
LeetCode 133. Clone Graph
20:44
7 месяцев назад
LeetCode 102. Binary Tree Level Order Traversal
10:50
7 месяцев назад
LeetCode 15. 3Sum
15:16
7 месяцев назад
Комментарии
@codepatasala
@codepatasala Месяц назад
Do try the geeks for geeks problem given in the description. It has slight variation.
@zusery123
@zusery123 2 месяца назад
This is the best video on this problem. There are many videos on coding dp solution. But no one explains through recursion the intuition behind DP. Thank you.
@yeminenisivaparvathi769
@yeminenisivaparvathi769 2 месяца назад
Please teach java mam
@codepatasala
@codepatasala 2 месяца назад
Planning to do soon. Havent decided on java or python yet. Will you prefer video in telugu or english?
@yeminenisivaparvathi769
@yeminenisivaparvathi769 2 месяца назад
Please do in java ​@@codepatasala
@codepatasala
@codepatasala 2 месяца назад
@@yeminenisivaparvathi769 ok, Would you prefer teaching in english or telugu?
@yeminenisivaparvathi769
@yeminenisivaparvathi769 2 месяца назад
@@codepatasala both
@yeminenisivaparvathi769
@yeminenisivaparvathi769 2 месяца назад
Please do more videos
@codepatasala
@codepatasala 2 месяца назад
At 7:50, can you tell why we don’t have to compute start of the merged interval by doing a min of the starts similar to how we did for end?
@codepatasala
@codepatasala 2 месяца назад
A similar problem "Permutations of a given string" for practice. It uses the same technique explained in this video. www.geeksforgeeks.org/problems/permutations-of-a-given-string2041/1
@yeminenisivaparvathi769
@yeminenisivaparvathi769 3 месяца назад
I am requesting you to please upload a video daily
@codepatasala
@codepatasala 3 месяца назад
Thanks for the encouragement. Hope you are liking the videos. Struggling to get time. Will try to increase the pace.
@codepatasala
@codepatasala 7 месяцев назад
small correction @ 13:57 child of 3 is 0 and not 1 (similarly in the adjacency list it should 0 for child of 3)
@codepatasala
@codepatasala 8 месяцев назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ICJ252WY5Bw.html is one of the application of level order traversal and can be practiced together.
@seshikanth4892
@seshikanth4892 9 месяцев назад
last approach was good madam. thank you and happy new year!
@codepatasala
@codepatasala 9 месяцев назад
Happy new year to you too. Thank you. Please like and share :)
@codepatasala
@codepatasala 10 месяцев назад
CORRECTION: 7:00 we are using additional memory for the queue and the space complexity is also O(m*n)
@seshikanth4892
@seshikanth4892 10 месяцев назад
super madam. Multi bfs and dp.
@shivar8023
@shivar8023 11 месяцев назад
awesome explanation
@codepatasala
@codepatasala 11 месяцев назад
Please like, share and subscribe. 👍🤝
@codepatasala
@codepatasala 11 месяцев назад
at 04:50 there is typo of + instead of ',' in the recursion equation. Correct one is height(node) = MAX(height(node.left), height(node.right)) + 1
@codepatasala
@codepatasala 11 месяцев назад
Do you think we can use a `Stack` instead of `Queue` here? Please leave a comment on your thoughts.
@codepatasala
@codepatasala 11 месяцев назад
Let's modify the original problem slightly. 🤔 Instead of returning the second middle node, can you adapt code to return the first middle node if there are two middle nodes?
@codepatasala
@codepatasala 11 месяцев назад
Please like, share and subscribe. 👍
@codepatasala
@codepatasala 11 месяцев назад
Please like, share and subscribe. 👍
@codepatasala
@codepatasala Год назад
Yes, Moor's voting algorithm works only if there is an element which occurs > n/2 times. Hence, for the example 1 0 1 0 2 2 it wont work. If such an input is possible, we need to do the second pass and verify that the candidate is indeed majority element. But, the problem statement here clearly states that majority element always exists. So, we need not handle that.
@seshikanth4892
@seshikanth4892 Год назад
Counter example 1 0 1 0 2 2 Algo cancels out 1st 2 pairs and returns 2 as majority ele but it is not in fact
@codepatasala
@codepatasala Год назад
This example doesn't have majority element (element which occurs >n/2 times). This input is not possible as per the assumption given that majority element always exist.
@seshikanth4892
@seshikanth4892 Год назад
en.m.wikipedia.org/wiki/Boyer%E2%80%93Moore_majority_vote_algorithm Please feel free to correct if I am thinking wrongly
@seshikanth4892
@seshikanth4892 Год назад
Good one madam. But second pass is needed to confirm whether what we found is really the majority ele. I saw some arrays where without second pass the presumed one may not be majority ele. Reference- wiki It says the following However, it is possible to perform a second pass over the same input sequence in order to count the number of times the reported element occurs and determine whether it is actually a majority. This second pass is needed, as it is not possible for a sublinear-space algorithm to determine whether there exists a majority element in a single pass through the input.
@codepatasala
@codepatasala Год назад
problem statement says majority element always exists. Hence, second pass is not required.
@seshikanth4892
@seshikanth4892 Год назад
Nice! Telugu lo chepachu kada madam. In fact lot of youtubers cover these stuff. Hardly any telugu algorithm based youtubers baring language based. My opinion Few telugu based youtubers have ~4 lakh subscribers Don't think local language base is small. Being a satiating pond is better than being a drop in ocean.
@codepatasala
@codepatasala Год назад
I had similar thought process and started as Telugu channel. Did a few videos on algorithms in Telugu two years ago. But the reality was different. No views 😀 So, I stopped. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wNqa2ohsYn8.html With feedback and encouragement from students, restarted recently with things that would be useful for them. Lets see how this episode goes.
@seshikanth4892
@seshikanth4892 Год назад
@@codepatasala But i came to your channel when i googled for coding problems in telugu. Hardly any in fact and your channel was in mid of 1st page. In fact in english, there are many too gud. Erichtoo , colin, and many more...
@codepatasala
@codepatasala Год назад
@@seshikanth4892I hope to make it one stop for telugu students.
@trueemperor3647
@trueemperor3647 Год назад
Hi.. mam can u guide me how to get off campus jobs .. now in 3rd sem
@codepatasala
@codepatasala Год назад
Hi, depending on your branch and current comfort level, you have to practice coding problems. LeetCode is a good platform. You should be able to solve atleast 100 easy and medium problems there before interviews. After that, participating in hackathons is a good way to get off campus calls. A good summer internship plays a very good role. If you need more information, you can get in touch via WhatsApp at codepatasala.com/#contact
@trueemperor3647
@trueemperor3647 Год назад
@@codepatasala thank you mam for your reply
@seshikanth4892
@seshikanth4892 Год назад
Bagundandi. Inka videos cheyandi. Pls write in bigger handwriting
@codepatasala
@codepatasala Год назад
I am glad that you liked it. Planning to do a complete series of around 160+ problems to help prepare for tech interviews. 🤞 Thank you so much for the feedback. Will work on improving handwriting, still learning to write on screen.
@codepatasala
@codepatasala Год назад
5:37 parenthesis are missing in calculation. Formula if there are odd chars is => lengthOfString - (noOfOddChars - 1) Which means 8-(2-1)