Can you solve this problem in one line?

Sdílet
Vložit
  • čas přidán 4. 11. 2022
  • 1. How to solve Leetcode problems?
    2. How to solve Binary Tree problems?
    3. How to use Leetcode solutions?
    4. How to crack coding interview?
    5. How to learn Data Structures and Algorithms?
    I will answer some of these questions in this video.
    ► Resources:
    1. Leetcode Problem link: leetcode.com/problems/maximum...
    ► For more content like this, subscribe to our channel: / powercouple26
    ► Follow us on Linkedin:
    / gabag26
    / sarrabounouh
    ► Let's be FRIENDS! / power_couple26
    ► For business inquiries, reach us on: powercouplejourney@gmail.com
    #datastructures #datastructuresandalgorithms #leetcode #codinginterview
    DISCLAIMER: All opinions shared on this channel are our own and don't express views or opinions of our employers. We only use our experiences and public knowledge to make our content. NO CONFIDENTIAL INFORMATION of our employers is used or shared on this channel. This is not a Professional Coaching channel, it only highlights the public resources that have worked for our careers.
  • Věda a technologie

Komentáře • 86

  • @atlasatlantis8447
    @atlasatlantis8447 Před rokem +23

    Awesome, there are not enough coding problem walk throughs on youtube. More Please!

  • @surya8985
    @surya8985 Před rokem +6

    return (root==null)?0:1+Math.max(maxDepth(root.left),maxDepth(root.right));

  • @kunalchauhan5294
    @kunalchauhan5294 Před rokem +3

    I often get surprised by how you make things easier.
    The simplicity was great

  • @prathikkumar6823
    @prathikkumar6823 Před rokem +4

    Loved the video !Please give your solutions for every leetcode medium problems as it will of great help for many self learners !!!!

    • @sahilandsarra
      @sahilandsarra  Před rokem

      Will try to make more Leetcode videos in the future. Thanks 🙏

  • @athulstalwart2715
    @athulstalwart2715 Před rokem +1

    Much Awaited This Kind of videos,Thank you!♥

  • @vedparkashgaba5478
    @vedparkashgaba5478 Před rokem +1

    Excellent curious for more this type of videos Thanks for sharing Pls continue

  • @itz_me_imraan02
    @itz_me_imraan02 Před rokem +5

    you can start a series on some most important DSA techniques like two pointers, merge intervals etc.etc..

  • @witcherfitness3227
    @witcherfitness3227 Před 10 měsíci

    Now I'm watching your videos for motivation sometimes, when I'm tired of solving leetcode problems. Thanks alot bro.

  • @harikrishnanpandyan5684

    Please make like these videos.. It too...💥💥💥helpful

  • @aaloBoy12477
    @aaloBoy12477 Před rokem +4

    we wants more videos like this plz .
    solving leetcode different approaches :)

    • @sahilandsarra
      @sahilandsarra  Před rokem +1

      Will try to cover more interesting problems in the future.

    • @aaloBoy12477
      @aaloBoy12477 Před rokem

      @@sahilandsarra thanks sir 🙏

  • @Martialarts7700
    @Martialarts7700 Před rokem +1

    Thanks lot how you make things clear simple and easier great man big like for your help

  • @Nishi-Tiwari
    @Nishi-Tiwari Před rokem +2

    Hey Sahil, Thanks for explaining it in such a simple way please post more videos on different topics of DS and how to approach similar questions in a similar logic. It would help a lot.

    • @sahilandsarra
      @sahilandsarra  Před rokem +1

      I will try to bring more videos like this. Thanks 🙏

  • @HomeremediesDG
    @HomeremediesDG Před rokem +1

    Yes I'm already subscribe,please do more logic of python ,Great Man 👍

  • @mick5719
    @mick5719 Před rokem +1

    Amazing Video

  • @vishalmane3139
    @vishalmane3139 Před rokem

    dude, aftér pursuing master in mech, what made u to choose software engineering.. n after ur master hw much time it took for u learn development and land a job ?

  • @Md_sadiq_Md
    @Md_sadiq_Md Před rokem +2

    Pushing the algorithm ❤️❤️

  • @itz_me_imraan02
    @itz_me_imraan02 Před rokem +1

    make more such videos on how to approach random interview questions ♥

  • @user-tl1ws2gd9s
    @user-tl1ws2gd9s Před rokem

    Well I watched one of your videos telling about to start with python for beginners... But i am learning JavaScript should I change? .. or you also told to avoid or take less lectures on udemy and so on ! But I'm learning from there ... And I'm feeling comfortable completely... Should I have only do just practicals or make minor projects or go through the course 😶what should I do.. complete the course or just let it go.😶? Please reply

  • @kreetykishore627
    @kreetykishore627 Před rokem

    i recently watched your video on youtube. you said that you would start to code from 6pm to 1am. how are you able to code long hours without sleep and sitting long hours before computer. what is your routine to start coding

  • @Midnight-nb8kg
    @Midnight-nb8kg Před rokem

    Hey, I was wondering if The Complete Data Structures and Algorithms Course in Python Data Structures and Algorithms from Zero to Hero and Crack Top Companies 100+ Interview questions (Python Coding) on udemy is a good course to purchase for python dsa, right now it is 15 dollars due to student discount?

  • @gokul7701
    @gokul7701 Před 11 měsíci

    iam beginner,just started to learn python by following the roadmap suggested by you.i dont understand anything you hjave mentioned here.would I eventually be able to understand these topics?

  • @almousafir4041
    @almousafir4041 Před rokem +1

    Excellent 👍

  • @_pro_grammer_
    @_pro_grammer_ Před rokem

    Sorry fo late comment. My intermediate exam started today. Pray for me. After my exam ends, I will follow all the instructions you shared. Thanks for sharing your journey💙💙💙

  • @rishiraj2548
    @rishiraj2548 Před rokem

    If initial val of maxDepth is zero (for a tree with only root node), then maxDepth upon one step down should be 1. Why you suggested 2 for (3---9)?
    Elsewise, if the maxDepth for two nodes (3---9) is to be 2, then initially maxDepth for root node must be 1. Doing so will maintain continuity of values and will work great programmatically,too.

    • @sahilandsarra
      @sahilandsarra  Před rokem

      If you look at the code, you will see that we return when we hit null, not at the leaf node. That’s why I started at 0. But you can start with 0 if you want. I’m not sure if it’ll be as clean. You can comment with your code if you tried it already.

  • @vinayak1763
    @vinayak1763 Před rokem

    brother i am self learner and a math guy please tell me will i require physics in programming in future

  • @SelfLabByFaraz
    @SelfLabByFaraz Před rokem +1

    Co incidentally, i was solving a problem before i started watching this video.
    return root == null ? 0 : Math.max(1 + maxDepth(root.left), 1 + maxDepth(root.right))

  • @gyanaranjan6526
    @gyanaranjan6526 Před rokem +1

    please make more on these

  • @srimani9327
    @srimani9327 Před rokem

    Hello Mr. Sahil. This is Srimani here!!
    I am great follower you. I have been continuously watching your youtube videos.
    I have been getting quality and tiny things you have told it in your youtube videos that gives massive improve on my coding journey.
    As a follower I need one thing from you.
    Can you suggest me road map to become a .Net developer.
    Regards from srimani!!!

  • @nitinmittal1706
    @nitinmittal1706 Před rokem

    Good video. You are very polite and helpful.
    I am 37 and unemployed. I am an MCA post graduate in 2010. Couldn't get a job in IT sector. So now my mindset is not stable. What to do?

  • @sigmamale7914
    @sigmamale7914 Před rokem

    Would you please upload blockchain developer roadmap?

  • @sachinsharma5242
    @sachinsharma5242 Před rokem +2

    Sir I am a Btech Student in First Year from CSE from States Institute. Can I crack FAANG in next 4 years? Please guide me about this. What will be the steps that help me to get in FAANG.I need your help 🙂. I am ready to do hardwork to get success.But I need some guidance. I have only 4 years to crack this. I need some personal attention from you if possible. I am just on starting point and learning java. I choose java as I learned some java in my school and I am familiar with that .

  • @Dunith_Munasinghe
    @Dunith_Munasinghe Před rokem +1

    Thank you ❤️

  • @naveen12
    @naveen12 Před rokem +2

    Is it possible to start solving leetcode problems without learning DSA? if not can it be done parallely by doing DSA course? I want to get started sooner please guide..

    • @vishalgatla4606
      @vishalgatla4606 Před rokem +2

      just have basic knowledge of all data structure and start with Leetcode easy. In the beginning u will stuck a lot

    • @krishnodas6678
      @krishnodas6678 Před rokem +2

      People solve leetcode problems to learn DSA only good luck 👍

    • @sahilandsarra
      @sahilandsarra  Před rokem +2

      I think you should know basics of DSA before starting Leetcode. 👍

  • @jkntech2775
    @jkntech2775 Před rokem +1

    bro make a video of what is the actual work of frond end developers in companies that is what do they do in whole day ,what work they do.....

  • @srirakeshkumar
    @srirakeshkumar Před rokem

    present i was learning dot net full stack course ......can you please tell me what's the scope of dot net ...can i get job as dot net developer in faang companies?...faang companies use dot net technology or not ?

  • @abdulmuqtadir8898
    @abdulmuqtadir8898 Před rokem +1

    People binge watch your other videos and skipped this one, no wonder swe gets paid that way

    • @sahilandsarra
      @sahilandsarra  Před rokem

      Yeah, hoping more people would want to learn logic building at some point.

  • @albatrossgeez6637
    @albatrossgeez6637 Před rokem +2

    can you make these types of videos more

  • @rishiraj2548
    @rishiraj2548 Před rokem +2

    👍

  • @popilarflims5397
    @popilarflims5397 Před rokem +1

    I am confused In space complexity i think it should be O(h) where h is height of tree

  • @moofarah359
    @moofarah359 Před rokem

    Can I you help me to solve. Simple cpde

  • @faridabadshortnews635

    I am 30 yr old now started coding , i am in support i am coding learning java could you please guide me if this is write approach and i will become a developer soon

  • @amateurcoder.
    @amateurcoder. Před rokem +1

    Please, I'm new to coding and I'm really interested in wep app development, which programming languages and frameworks should I concentrate on sir. I really need your advice. I've been following you for a while now and love your videos... I've also subscribed to your channel sir. Please help me.

    • @sahilandsarra
      @sahilandsarra  Před rokem +1

      Hi Luke! I have already made a separate video on this topic. Thanks 🙏

    • @amateurcoder.
      @amateurcoder. Před rokem

      @@sahilandsarra Please how can I get the video sir?

  • @bsaisalini7934
    @bsaisalini7934 Před rokem

    Do dsalgo vedio series

  • @WhosShamouz
    @WhosShamouz Před rokem +1

    PERFECT! Because I didn't know this data structure from the real world, I kind of avoided these questions 😂Keep up the great content!!!

  • @goriparthivenky1822
    @goriparthivenky1822 Před rokem +2

    I am too interested towards java programming language please make videos on full stack java developer

  • @dannyplayer2552
    @dannyplayer2552 Před rokem +1

    i love u bro

  • @kirubakaran1547
    @kirubakaran1547 Před rokem

    Its not code quality.keep things understandable💎

  • @ashketchum5357
    @ashketchum5357 Před rokem +1

    I just completed Html and Css tutorial from W3SCHOOLS. But I couldn't design(not programme) a simple calculator and had to see how it's done on Google.
    Is that normal or do I just suck?