Sir you're potential candidate to be a celebrity for sure Thank you !
@Elon-musk-0074 жыл бұрын
I never understood this question I had been just skipping this question . Thank you Sir... Keep up the good work ..... You will soon rise
@Pepcoding4 жыл бұрын
Keep watching
@yushsingla99053 жыл бұрын
i still miss your videos sir. I know you're a lot busier now but i would love if you yourself could still make such amazing videos, I really appreciate your work and am sure it will help people for many years. Even though i use c++ still watch all your videos when stuck on a problem.
@Pepcoding3 жыл бұрын
Working on it!
@sachinsharma9053 жыл бұрын
Sumeet sir,hamesha ki tarah aap toh cha gaye. Kya hi explain kiya aapna. Thanks.
@faizanhaider3953 Жыл бұрын
Gardaa.... Question kaa Dhajji Dhajjji ura sir aap to.... 🙏🙏
@harshchandwani97813 жыл бұрын
This question made me a fan of you, no one can explain it better than you
@architsharma43313 жыл бұрын
Sir this is my approach to do this Question in O(n):- public static void findCelebrity(int[][] arr) { Stack st=new Stack(); //this loop will find the rows having 0 in them and push them in stack for(int i=0;i
@indranilchakraborty59494 жыл бұрын
Thank you sir.... now I am just arrived in second year but still able to understand.
@Pepcoding4 жыл бұрын
All the best. If you like the content, please share in your circles.
@Live-hh6li3 жыл бұрын
Thanks again Nowadays KZbin recomend your videos on top to me Saves a lot of time in finding good solution.
@Pepcoding3 жыл бұрын
Glad to hear that!
@enigma28864 жыл бұрын
kya teacher ha yein bhai saab ! dhanyawaad sir ji !
@brijpatel2373 жыл бұрын
there's a reason why this video still doesn't have any dislikes, awesome quality and logic.
@Pepcoding3 жыл бұрын
It's all because of the love and respect which you people have given to me. If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms ) Keep motivating, keep learning and keep loving Pepcoding😊
@avinashchaurasiya64973 жыл бұрын
After searching soo much I found that you are a celebrity.❤❤
@Pepcoding3 жыл бұрын
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😊
@gauravshukla52034 жыл бұрын
your explaination is the best on internet..great sab kuch samjh a gaya itni asani se
@Pepcoding4 жыл бұрын
thank you
@piyushsarraf99943 жыл бұрын
Sir, Bhagwan aapka bhala kare Mast samjhate hai ek hi baar me aa gya
@Deepakkumar-kl6ni3 жыл бұрын
One day know you all according to your lacture We understand you by working very hard Thank you very much Sir
@Pepcoding3 жыл бұрын
Thankyou beta! I am glad you liked it. If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
@chitranshsaxena593 жыл бұрын
I was always scared of this question, and today, I only saw the video till 6:14 and I was able to solve the question... His solutions are good...but his way of explaining any problem, that is insane
@Pepcoding3 жыл бұрын
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 )
@pranav2882 жыл бұрын
@@Pepcoding WTF ??
@Pepcoding2 жыл бұрын
@@pranav288 Don't worry. We are soon to close the website, anyway. So it doesn't matter anymore.
@pareshshikhaliya47023 жыл бұрын
good work and very good explanation but this can be done with O(1) space complexity which increase student more chances to get selected bellow find the O(1) space and O(n) time complexity public class Solution extends Relation { public int findCelebrity(int n) { int candidate = 0; // First pass to find out the potential candidate for (int i = 1; i < n; i ++) { if (!knows(i, candidate)) { candidate = i; } } // Second pass to determine if that candidate is a celebrity for (int i = 0; i < n; i ++) { if (i != candidate) { if (!knows(i, candidate)) { return -1; } if (knows(candidate, i)) { return -1; } } } return candidate; } }
@yogeshwarshendye48573 жыл бұрын
Sir a slightly different approach: check all rows if any of item is 1 break the loop, this gave me the row that had all 0s and i kept that number in a stack. If stack size comes to be 0, there are no celebrity but otherwise, check for column of that number. If any one is 0, no celebrity, otherwise that number comes out to be the celebrity. This solution submitted and score 10. But I am not quite sure it it is the right way.
@shrad66112 жыл бұрын
shandaar jabardast jindabaad, hats off to you sumit sir
Thankyou beta! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@bishalchatterjee81842 жыл бұрын
Pepcoding is the best!!!!!!!!!!!!!! Loved the explanation sir!
@vyomyadav64973 жыл бұрын
Sir just a tip, try to animate your content and get into the mind of youth, you are the most excellent teacher, you will do marvels.
@Pepcoding3 жыл бұрын
Ji beta, sochte h iske bare main
@Deepakkumar-kl6ni3 жыл бұрын
Sir apke samjane ka tarika bhot aacha hai 👍 ham specially for hindi medium student thanks sir aaap mahan ho
@Pepcoding3 жыл бұрын
Thankyou beta! I am glad you liked it. I also hope that you are watching till the end and trying to understand the what, how, and especially why of the problem. If you like our efforts, will you like to review us here - g.page/Pepcoding/review?rc
@MindsetMotivation752 жыл бұрын
I understand the solution in just one flow . Thank you sir
@FaisalKhan-ce2qu4 жыл бұрын
its great that you are making a separate video for implementation! a great help to new coders like me ! kudos !
@Pepcoding4 жыл бұрын
Are you aware ki we have a portal as well, jahan question submit kar sakte hain www.pepcoding.com/resources/online-java-foundation
@AyushKumar-fk5lm3 жыл бұрын
Could solve this only because of Sumeet Sir! Thank you sir!!🙏
@Pepcoding3 жыл бұрын
Thankyou beta! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@AyushKumar-fk5lm3 жыл бұрын
@@Pepcoding Definitely sir! Itna toh kar hi sakta hoon aapke lye!!
@stith_pragya7 ай бұрын
Thank You So Much for this wonderful video .........🙏🙏🙏
@shashanksabharwal85914 жыл бұрын
No dislike till now, this is the power of pepcoding,,,, The only reason why i dont watch your all videos is that i know c++not java " :( i am missing such a great sessions from you,,, this is so sad ,, But i understood the concept its easy to code the same in c++, Thankyou :)
@Pepcoding4 жыл бұрын
Welcome back
@DeepakKumar-yl3ok3 жыл бұрын
very nice , sumeet malik sir never disappoints
@sumantkumar63414 жыл бұрын
sir bahut achche se samajh me aaya h
@mickyman7533 жыл бұрын
love you sir ,boht hi pyara samjhaya
@namanpatni87403 жыл бұрын
owsm explaination....seriously i was about to skip this question ...just thought to search on youtube and found you fortunately ...thinking i can code ...you explained the overall picture of this question that part i like...thanks :)
@riddhibandyopadhyay5843 жыл бұрын
Too good.... This is the kind of explanation we all need
@Pepcoding3 жыл бұрын
Thank you so much and If you like the content could you post something on LinkedIn about us? This will help us in reaching out to more people and help a lot of other students as well Something like this Sumeet Malik from Pepcoding is making all his content freely available to the community You can check it out here - www.pepcoding.com/resources / Also, this is the youtube channel - kzbin.infoplaylists?view_as=subscriber
@av1shekps3 жыл бұрын
Don't know why this channel is underrated?
@ANKITSINGH-xe5wk3 жыл бұрын
this channel has true subscriber. it is increasing slowly but it will reach to top . i am sure about this
@Pepcoding3 жыл бұрын
wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit.
@harshwardhanchougule3039 Жыл бұрын
Great Explanation !!!!! Your videos are best explained on KZbin
@rishigupta73712 жыл бұрын
We can do the same in O(1) space. Instead of using stack we can eliminate persons and update the celebrity in a variable. int celebrity(vector& M, int n) { // code here int celeb=0; for(int i=1;i
@unstoppable96683 жыл бұрын
Excellent explanation , Its almost more than 6 months and 0 dislikes shows how good the explanation was.
@Pepcoding3 жыл бұрын
Thankyou beta! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a review about us here - g.page/Pepcoding/review?rc
@MohitG77014 жыл бұрын
your method of explanation is very awesome. You have the unique talent of making difficult problems easy. Hats off to u sir
@hannanhub1717 Жыл бұрын
very easy explanation of concept and code
@aindrilasaha15923 жыл бұрын
I was a fan of your explanations, and will remain so,always! Thank you Sir!!
@Pepcoding3 жыл бұрын
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😊
@kushagra44013 жыл бұрын
thank you so much sir
@ambarishdashora54403 жыл бұрын
wow, You are awesome. I could never think of this question in this way.
@ketansharma6955 Жыл бұрын
one of my favorite problems in level 1
@radharanimathurawali3613 жыл бұрын
Very nice explanation
@shubhamjain545192 жыл бұрын
3:29 condition 1 3:47 condition 2 watch again to understand
@gourangpathak2762 жыл бұрын
🙏🏻 will never forget this idea now
@Pepcoding2 жыл бұрын
Glad it helped. For better experience, visit nados.io, where you will get well curated content and career opportunities.
@yashraorane5782 жыл бұрын
Great explanation.
@shubham-pp4cw2 жыл бұрын
nice and simple explantation
@codetochange82 жыл бұрын
Very nice explanation sir
@kiyotakaayanokoji-pt7bs Жыл бұрын
such a great solution, thank you sir
@justanotherlearner14043 жыл бұрын
amazing teaching
@gauravbansal299811 ай бұрын
Awesome explanation, loved it!
@AdityaRaj-ix5rg2 жыл бұрын
nice explanation..thanks
@muskanshivhare64664 жыл бұрын
Thank you for such good explanation.
@Pepcoding4 жыл бұрын
I am glad this helped. Will you like to drop us a review? g.page/Pepcoding/review?rc
@aishwaryaranghar33852 жыл бұрын
ThankYou sir. You are the best
@rishavgupta78683 жыл бұрын
How to do this O(1) space as required in GFG question. (in this approach we are using stack of size n, it means space complexity is O(n)
@parissweetheart963 жыл бұрын
Instead of storing it in stack you can do like this. Assume 0 as the 1st celebrity and then iterate and check other possible celebrities. If any found update the celebrity. Rest of the step is same. int celebrity = 0; for(int i=0;i
@yashsomani30422 жыл бұрын
Thank you Sir , You taught really well
@paragroy53593 жыл бұрын
Nice explanation your videos are really good...please keep on making such videos.....you are doing a great job
@thecodingjournal47264 жыл бұрын
Wow this question was this easy, hats offfff
@kashishchugh25414 жыл бұрын
Sir, I have followed all your videos on stack and i loved all of them. I just have 2 doubts here: 1. Can't we after finding potential celebrity, now push array elements in reverse in new stack, so we will be able to check all the remaining cells, will it work? 2. How do we get the feel after seeing the question that it can be done by stacks, in earlier ques i understood because of next greatest or smallest concept, but in this ques or diff situations how do we know that we need stack?
@Pepcoding4 жыл бұрын
Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
@ParasVashishth_RV2 жыл бұрын
Actually u don't need a stack here, it can be done by a simple iteration also. Stack is used just as an example
@rishabhgoyal28354 жыл бұрын
amazingly explained..
@Pepcoding4 жыл бұрын
Glad you think so!
@saurabhshandilay82612 жыл бұрын
vaah sirji moj kr di
@kamalkumar9453 жыл бұрын
too good explanation
@himanshu21493 жыл бұрын
Brilliant Sir!! Thank you !!!
@nishantjoshi1674 жыл бұрын
awesome man....u have great teaching skills..God bless u :)
@Pepcoding4 жыл бұрын
Thanks, you too!
@prateeksrivastava94 жыл бұрын
Very Nice Explanation !Keep going Sir.
@Pepcoding4 жыл бұрын
Thank you bro. Padhte rahie.
@asishpanda35473 жыл бұрын
really nice explanation u just gained a subscriber, keep doing the good work.
@aryansaxena46303 жыл бұрын
thanks a lot sir ,great explanation
@willturner34403 жыл бұрын
Sir please upload more videos.. Always waiting for notification 😔
@sunnygoswami22483 жыл бұрын
Great explanation Sir!!
@jobanpreetsingh23703 жыл бұрын
Sir I know you but you don't know me So you are celebrity 😊😊
@shaunaksensarma83513 жыл бұрын
Fantastic solution and such a simple explanation.
@Pepcoding3 жыл бұрын
Glad you think so! 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 )
@nandinisharma78863 жыл бұрын
Thanks a lot sir !
@priyankaamahour3 жыл бұрын
Thank you so much Sir, great explanation.
@bhagirathmakwana9112 Жыл бұрын
sir, you are great!!!
@saitama_capedbaldy97583 жыл бұрын
It would great if he explains in English. Anyway I understood the approach. Great explanation!!!
@hritikagarwal76764 жыл бұрын
Thank you, sir. Your content and the way of teaching are amazing. It would be better if you provide some identification for problems related to stack. And also the intuition to this problem.
@Pepcoding4 жыл бұрын
Sure I will
@sachindeshpande45214 жыл бұрын
Awesome😊😊
@Pepcoding4 жыл бұрын
Thank you! Cheers!
@amishapurswani99574 жыл бұрын
sir you have explained wonderfully
@Pepcoding4 жыл бұрын
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
@satwikjain6177 Жыл бұрын
super explanation
@prernnajain15323 жыл бұрын
Sir but this is of order n square as we are using 2 for loops Ranging till the length then how it is order of n please clarify my doubt sir. Thank you
@puneethj99203 жыл бұрын
Great video!
@vivekdabas20114 жыл бұрын
Explanation is nice!!
@satyamsingh84594 жыл бұрын
100th like here i go!, thank you sir
@AyushSingh-lt2rq4 жыл бұрын
What an amazing explanation sir.Thanks a lot.
@Pepcoding4 жыл бұрын
You are most welcome
@soumavanag50253 жыл бұрын
awsome explanation :) thanks
@Pepcoding3 жыл бұрын
Thankyou beta! If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
@himanshusrivastav77383 жыл бұрын
Nice explanation dude!! keep up the good work. Hatss offf!!!!!!!!
@Pepcoding3 жыл бұрын
Thanks a ton.Keep learning, Keep growing and keep loving Pepcoding!😊
@SCRIPTSAG4 жыл бұрын
Bole to mja aa gya sir
@Pepcoding4 жыл бұрын
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 my efforts, I request a review g.page/Pepcoding/review?rc
@kc84784 жыл бұрын
Thank you sir
@Pepcoding4 жыл бұрын
yahi to chaie If you like our efforts, we request a review g.page/Pepcoding/review?rc You can subscribe to our channel here kzbin.infoabout?view_as=subscriber For clearing your doubts, you can join our community on telegram t.me/pepcoding
@kc84784 жыл бұрын
@@Pepcoding sir ur video of tum milay dil kihlay wali bohat barhia ha :)
@ayushgoel95844 жыл бұрын
sir, if possible, please upload 4-5 questions per day.
@himanshukumar16733 жыл бұрын
Thanks for owsm content in free
@Pepcoding3 жыл бұрын
Thankyou beta! I am glad you liked it. If you like our efforts, will you like to write a review about us here -g.page/Pepcoding/review?rc
@aasimalikhan63533 жыл бұрын
Amazing explanation sir.
@Pepcoding3 жыл бұрын
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 kzbin.infoabout?view_as=subscriber
@iuashrafi10 ай бұрын
Great ! Great ! Great !
@adityarathi34203 жыл бұрын
Thanks Sir :-)
@shivanshtiwari71094 жыл бұрын
What a superb explanation!!🙌🙌
@Pepcoding4 жыл бұрын
Glad you think so! Will you please drop us a review? g.page/Pepcoding/review?rc
@amitkumargupta67224 жыл бұрын
Thank u so much for easiest solution...
@Pepcoding4 жыл бұрын
Keep learning and Keep loving Pepcoding
@shubhankkhare93424 жыл бұрын
This problem can be solved without using stack. look at the code below :- int getId(int m[MAX][MAX], int n) { long pot = 0; for(long i = 1;i
@Pepcoding4 жыл бұрын
Yes it can be
@princesharma86763 жыл бұрын
thanq sir ji
@Pepcoding3 жыл бұрын
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 kzbin.infoabout?view_as=subscriber
@rohitangiras64763 жыл бұрын
Hello Sir, Kya Kabhi isme aise bhi ho sakte hain kya ki arr[ i ][ j ] == 0 and arr[ j ][ i ] == 0.Then uss time stack mein kya push hoga. Thanks
@anmolj3 жыл бұрын
Thank you sir.Really well explained.
@Pepcoding3 жыл бұрын
You're welcome. Keep watching and keep lovingPepcoding🙏