Glad to know that you liked the content and thank you for appreciating. The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos. So, keep motivating, keep learning and keep loving Pepcoding😊
Thank you for appreciating. The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos. So, keep motivating, keep learning and keep loving Pepcoding😊
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem. If you like our efforts, we request a review g.page/Pepcoding/review?rc You can subscribe to our channel here th-cam.com/users/Pepcodingabout?view_as=subscriber
Glad to know that you like our explanation. Visit - nados.pepcoding.com and sign up to NADOS. Also you can ask your doubts on community tab. There are lots of programmers and mentors who can help you out with such doubts. Don't forget to follow us on Instagram instagram.com/pepcoding/
Glad you liked it and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Happy to hear that! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Awesome explanation for a Leetcode Hard Problem. Made it Look like an easy level problem.
true
on Leetcode : Hard Level Question
on Pepcoding: easy toh tha yrr
Amazing explanation!!
I usually don't write comments... but you explanation is so great it made me write it...
You're awesome 🔥
Whole Pepcoding team is awesome 🔥
Rajneesh sir you are awesome teacher . Thank you for this wonderful explanation
Glad to know that you liked the content and thank you for appreciating.
The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
So, keep motivating, keep learning and keep loving Pepcoding😊
No Words!!!! completely mindboggling!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
After seeing 4-5 videos, I found it is very easy to understand .. Thanks sir !
Glad to hear that and you are most welcome.
OMG Explanation on Peak. OP🔥🔥🔥🔥🔥🔥🔥🔥
very nice explanation sir you guys are amazing. Pepcoding is like Amrit specially for tier 3 students. Thankyou very much
Thank you for appreciating.
The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
So, keep motivating, keep learning and keep loving Pepcoding😊
Nice explanation sir....thanks a lot for the video...explanation is really awesome
A very awesome and such a simple solution!! Thank you!!
great explanation sir. You have made the hard problem very easy.
Shandaar explanation!!
I am amazed by your explanation🤩🤩
Great explanation. Thanks for the content !!
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like our efforts, we request a review
g.page/Pepcoding/review?rc
You can subscribe to our channel here
th-cam.com/users/Pepcodingabout?view_as=subscriber
boht pyara question tha,first time dekhne pr toh samaj nhi aya ki kaise hoga ,but sir ne kitna easy bna diya
Thanks for another awesome video sir. Request you to finish Linked list playlist as well
Awesome explanation.
So smooth!
You make this question easy superb explanation
kahani sunate sunate sir ne ek problem sikha diya thanks sir awesome
Sir the way you explain is next ->level order traversal.😂😂
The explanation is made so easy to understand for such a hard question.
Glad to know that you like our explanation.
Visit - nados.pepcoding.com and sign up to NADOS.
Also you can ask your doubts on community tab. There are lots of programmers and mentors who can help you out with such doubts.
Don't forget to follow us on Instagram instagram.com/pepcoding/
Mind blowing explanation 🔥🔥
Woah !! this explanation was 🔥🔥🔥
great explain with include emotional expression...
Amazing explanation, no cap!
"Ooof" moments all around.
simple and easy Explanation. Thanks
Amazing explanation! subscribed!
speechless.... awesome explanation ❤️
Glad you liked it and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
great explanation bro
Best explanation 🔥
Great Explanation:)
Amazing Explanation 🔥🔥
Great explanation sir 🔥
Great explanation 👍👍👍
Glad you liked it!
Keep learning.
And for better experience, visit nados.io, where you will get well curated content and career opportunities.
bahut mst samjhaya bhaiya
great explanation 💯💯
Hairstyle looking great
Wow amazing..
great approach and explaination wow
Superb Explanation...🙏
Thanks a lot 😊. Please visit nados.pepcoding.com for more content like this
nice explanation sir....
Best explanation
Cool! Loved it
Thank you sir. Great explanation.
Glad you liked it.
Now, if you want to charge your career in coding sign up on nados.io and keep learning.
Nice explanation.
Amazingly Explained Sir!!!
Ya it was amazing!!
Thank you sir 🙂
Great explanation 💯
Glad it was helpful!
For better experience and well organised content visit - nados.io
just wow💯💯💯💯💯💯
awesome bhai gbu
great explanation. The only improvement I can suggest for this and other problems is discussing the run time and space complexity as well
Yes
Time complexity will be O(n)
Welcome back
Explanation is just so nice, easily understandable, ✨💕👏 just the explanation helped me write the code.
Happy to hear that! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Sir website par question available nhi hai
Crazy🔥
Thank you very much sir
Keep learning, Keep growing and keep loving Pepcoding!😊
Excellent!
Hope you love the explanation, for better experience and well organised content visit - nados.io
thaaanku
nice explanation
Glad you liked it!
Keep learning.
And for better experience, visit nados.io, where you will get well curated content and career opportunities.
What is the intuition of starting from the leaf node?
thank you
Best 💥
code in c++
class Solution {
public:
int ans=0;
int find(TreeNode* root)
{
if(!root)
{
return 1;
}
int left=find(root->left);
int right=find(root->right);
if(left==-1||right==-1)
{
ans++;
return 0;
}
else if(left==0||right==0)
{
return 1;
}
return -1;
}
int minCameraCover(TreeNode* root)
{
if(find(root)==-1)
{
ans++;
}
return ans;
}
};
For better insight, visit nados.pepcoding.com
you made it a cakewalk
Is this problem available on pepcoding website
one test case on leet code is unable to pass
for input [0,0,null,0,null,0,null,null,0]
please check it..........
bro remove "public static" from "public static int cameras = 0". It will work
@@srinivasv1488 can you please give me the the reason ?
Sir, kindly give the problem link also of these problems so that we can code it up by ourselves :3
And I thought this was a hard problem :o
Sir it is not working on one case [0,0,null,0,null,0,null,null,0]
output: 3
expected: 2
public static int cameras = 0;
remove public static
int cameras = 0;
it will work.
@@VishalKumar-sm8bo static ke bina kaise chalega bhai?
Jitu bhaiya ki videos dalwa dijiye sir c++ bhot piche chl rha h
awesome!!!!!
Thank you! Cheers!
trees playlist ho gyi complete?
coloring game,max product of splitted bnary tree from leetcode kra dijye if possible
sir apki playlist nahi mil rahi channel pe trees ka please make a playlist of tress;
best
Sir ab c++ bhi suru kardo bahut picha hai hamara
Sir apne ye question public nahi kiya.
sir leetcode 1530 solution please
Sir please please upload the videos level up ki videos kb tk upload jayengi sir
utni jldi popularity milegi sir liek geeksforgeeks
I am buying a Camera.
1339. Maximum Product of Splitted Binary Tree
please make video on this too sir🆒🆒▶▶
Java Solution: # leetocde.
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val = val;
* this.left = left;
* this.right = right;
* }
* }
*/
class Solution {
int camera=0;
public int minCameraCover(TreeNode root) {
if(helper(root)==-1){
camera++;
}
return camera;
}
public int helper(TreeNode root){
if(root == null){
return 1;
}
int lc=helper(root.left);
int rc=helper(root.right);
if(lc==-1 || rc== -1){
camera++;
return 0;
}
if(lc==0 || rc==0){
return 1;
}
return -1;
}
}
Great explanation. Thanks for the content !!