How I make HARD coding problems look EASY

Поділитися
Вставка
  • Опубліковано 6 жов 2023
  • 1. How to crack coding interviews?
    2. How to prepare for coding interviews?
    3. How to learn Data Structures and Algorithms?
    4. How to use Leetcode effectively?
    5. How to ace Software Engineer interviews?
    I will answer all these questions in this video.
    ► Useful links:
    14 Patterns for Coding Problems: hackernoon.com/14-patterns-to...
    ► 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
    #codinginterview #datastructures #datastructuresandalgorithms #leetcode #dsa
    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.
  • Наука та технологія

КОМЕНТАРІ • 141

  • @VijayKumar-dn4pz
    @VijayKumar-dn4pz 8 місяців тому +20

    The thing about finding new patterns when you hit a wall is so true. I used to have trouble solving certain problems and then I found out about dictionaries and tuples. I was able to solve so many more after it. Need to find more patterns again. Thank you!

  • @Holfter
    @Holfter 8 місяців тому +86

    I think my brain is thinking super slow, I couldn't even understand the bat and ball thing 🤣

    • @mayurrajput8408
      @mayurrajput8408 8 місяців тому +4

      Same bro😂😂

    • @vigneshbabu9382
      @vigneshbabu9382 8 місяців тому +11

      Here the trick part is "the bat cost 1 dollar more than the ball"
      Which means, the ball cost is also there in the bat plus 1 dollar.. so if the ball cost $0.10 then the bat would cost $1.10 and total would be $1.20 dollars which is not the right answer.

    • @PraveenFullStack
      @PraveenFullStack 8 місяців тому +1

      ​@@vigneshbabu9382but ball costs 5 cents 🙄

    • @BrainRainGoAway
      @BrainRainGoAway 8 місяців тому +17

      statement 1: bat+ball=1.10,
      statement 2: bat=1+ball
      put statement 2 in 1: 1+2ball=1.10
      that means ball=0.10/2 => 0.5 cents
      i also did not understadn directly but instead like this.

    • @pranavpatil398
      @pranavpatil398 8 місяців тому +6

      Same bro mine is working even more slower that i can't even understand these solutions 😂

  • @aldoaguirre9864
    @aldoaguirre9864 7 місяців тому +1

    thank you so much for this!

  • @DeltaXML_Ltd
    @DeltaXML_Ltd 7 місяців тому +1

    Fantastic, useful video!

  • @acecool1715
    @acecool1715 8 місяців тому

    Thank you for sharing.

  • @AbhishekThakur-bw6co
    @AbhishekThakur-bw6co 8 місяців тому +2

    Hey love from India, i really loved how you explained tha backtracking problem. I have never gone through an explaination like this before. If there is any book to understand problems like this, please refer ❤

  • @ashwinalagundi9271
    @ashwinalagundi9271 2 місяці тому +1

    Nice explanation. It's true we need to use both fast and slow brain.

  • @GB-su9gu
    @GB-su9gu 8 місяців тому

    Thank you for sharing ❤
    Sahil.😊

  • @jatinnandwani6678
    @jatinnandwani6678 8 місяців тому

    Combination of fast brain and slow brain
    Thanks so much for this

  • @toughmanful
    @toughmanful 8 місяців тому

    Amazing video

  • @haha-eg8fj
    @haha-eg8fj 6 місяців тому

    to be able to spot the patterns you need to be exposed to a large dataset, which means you have to solve enough problems to gain that knowledge. And that is far from enough because if you do it slightly differently than the optimized solution there will be tons of edge cases to be considered.

  • @almousafir4041
    @almousafir4041 8 місяців тому +6

    Excellent partage ❤ Big like 351❤❤

  • @nirajbhuvad9440
    @nirajbhuvad9440 8 місяців тому +2

    Hey can you give us a info about software testing and it's survival ratio in future. Thanks

  • @markchoorakat2313
    @markchoorakat2313 8 місяців тому +2

    Can someone solve this for me?
    In the army of Andromeda, the soldiers are segregated by rank. Each soldier except the first has a superior officer. The codes for the nuke are given to 2 soldiers for security purposes, and each would relay the information to their superior officer (this keeps on happening till it reaches the top most officer). The first officer who gets the information from two of his subordinates would detonate the nuke. Given m such queries find the officer who would detonate the nuke for each of them
    Input Format
    First line has an integer n,m, for the number of soldiers and number of queries. Second line has n−1 integers p2,p3,p4 … pn where pi is the superior officer of officer i. Next m lines have 2 integers a and b, such that the codes are given to soldiers a and b.
    Constraints
    1

  • @joydebnath2658
    @joydebnath2658 8 місяців тому

    Your voice is my Impulsions. Take lv dear vya💗

  • @unyimeudoh1697
    @unyimeudoh1697 8 місяців тому +1

    Please Sahil can you make a video on how to solve recursive problems. I'm finding it hard to understand recursive algorithm. 🙏

  • @abhijeetdey4800
    @abhijeetdey4800 8 місяців тому

    how do you create graphics for videos? specifically looking for a animated donut or pie chart. suggestions?

  • @vedparkashgaba5478
    @vedparkashgaba5478 8 місяців тому

    Awesome video thanks for sharing

  • @srinivasa5650
    @srinivasa5650 8 місяців тому

    Thanks

  • @techie544
    @techie544 8 місяців тому

    Saw that bat and ball cost example in one of your videos. Good to hear it again..

  • @Kaviarasu_NS
    @Kaviarasu_NS 8 місяців тому +1

    This video made my day ❤

  • @mohan_max2783
    @mohan_max2783 8 місяців тому +2

    Hello sahil, Thanks for sharing this video. I believe this will help so many coders. Coding is not about memorizing it's all about building intuition and practice.

  • @Fordalo
    @Fordalo 7 місяців тому

    This is underrated

  • @horacioparraguirre7486
    @horacioparraguirre7486 5 місяців тому

    Cool Sahil 😃👍

  • @duncancamilleri8614
    @duncancamilleri8614 14 днів тому

    took me some thinking between both fast and slow brain to get to a bat costing $1.05 and a ball costing $0.05. When solving things with the fast brain, sometimes it takes one on a journey with their slow brain to make sure they got it right only to find oneself doubting self and repeat checking with the slow brain; only to confuse oneself! At least, that's what I experience when I try to do things my fast brain does with the slow brain!

  • @Krishna.369.
    @Krishna.369. 8 місяців тому

    Much needed and awaited video ❤

  • @aznstride4325
    @aznstride4325 8 місяців тому +1

    I currently work as an L4 in Amazon, can you compare your experiences between Amazon and Google?

  • @vasujhawar.6987
    @vasujhawar.6987 8 місяців тому +1

    *Moral of the Story* : Practice, Practice, Practice. Look for patterns in the way, and memorize those and apply them next time.

  • @manikantanallana5227
    @manikantanallana5227 8 місяців тому

    Hi sir , just a small information , if we take certification for python and pandas and if we try for a job will we get good job , actually having experience of 7 years and trying to switch career to be in good start if I did certification and try for job and luckily if we got in service based company , can it be a good start as part of career switch so that we will keep on working and try for big companies after we habituated with python work culture ?? Please replay sir with your views really need your help on this sir. Or suggest any certification which will help us to boost career

  • @abdulmalikYT_BGMI
    @abdulmalikYT_BGMI 8 місяців тому +5

    Your content is soo aaawsome!!👌🏻... Trust me your videos not only gives me a good solution to my issues as a developer but also gives me motivation boost ❤️

  • @SystemsAdventure
    @SystemsAdventure 8 місяців тому +1

    I thought I knew how to program until I started doing let code 😂

  • @NooraSpeaks
    @NooraSpeaks 8 місяців тому +4

    After watching this Video Who wants to learn DSA from Saahil 🙋🙋‍♀️?

  • @koushiken6641
    @koushiken6641 7 місяців тому +1

    Also please make a video on how to make our brain stop thinking about girls while in the middle of coding....

  • @therandomdude8827
    @therandomdude8827 8 місяців тому

    ey techathon me submission kiya hai 15 ko aakhri din hai aurf kya better kr skte hai???

  • @roshangeorge97
    @roshangeorge97 8 місяців тому +2

    Much needed one! Thanks Sahil!

  • @MilkaSingh-rt6zp
    @MilkaSingh-rt6zp 17 днів тому

    Question, open to anyone, lets say the brain gets trained, interview is cracked and the job is offered as well, how often do engineers in FAANG companies actually come across these kind of challenges in their day to day life working in one of these companies?
    PS: I know a fperson who works in one of the FAANG and described codebase of one of their most popular product which gets offered to their customers where the class file seemed to contain over 1000 lines of code with single method averaging over 300 lines and no documentation

  • @sbsafi4981
    @sbsafi4981 4 місяці тому +1

    My brain is so slow even I couldn’t understand this video 😢

  • @shwetaj8189
    @shwetaj8189 8 місяців тому +1

    Hard problems also involves applying some trick which is not always obvious.Average students can not think of them immediately. Can you please tell us how to think of such tricky problems.

    • @hhandle
      @hhandle 8 місяців тому

      Just relax and enjoy the process don't think of it as a problem just think of it like a puzzle then you'll get your answers

    • @doomed5206
      @doomed5206 7 місяців тому +1

      I think that I am an average student but slowly reaching my there. What I used to do before I just used to look at problem and immediately decide whether I can or not but now I try to think more in depth and give sometime to the problem. and I would say it is totally fine to be wrong sometimes You just get to learn new things.

  • @ravitejajinka8973
    @ravitejajinka8973 7 місяців тому +9

    To people like me :
    Let the cost of the ball be "B" in dollars. According to the information given, the bat costs $1 more than the ball, so the cost of the bat would be "B + $1."
    Now, we know that together, the bat and the ball cost $1.10. So, we can set up an equation:
    B + (B + $1) = $1.10
    Combining like terms:
    2B + $1 = $1.10
    Subtract $1 from both sides of the equation:
    2B = $0.10
    Now, divide by 2:
    B = $0.10 / 2 = $0.05
    So, the cost of the ball is $0.05 or 5 cents.

  • @abdulmalikYT_BGMI
    @abdulmalikYT_BGMI 7 місяців тому

    Sara and Sahil please make a couple vlog😅.
    please try add any travel or monthly vlog🫰🏻

  • @vigneshs6232
    @vigneshs6232 8 місяців тому +1

    Really Intuitive Video.....

  • @fabianfrankwerner
    @fabianfrankwerner 8 місяців тому +6

    👋 My summary:
    - 00:00 🧠 Developing Intuition for Coding Problems
    - Understanding the importance of intuition in solving coding problems.
    - Introduction to the concept of "Fast Brain" and "Slow Brain."
    - Exploring the role of both brains in coding interviews.
    - 02:18 🤖 Training Your "Fast Brain" to Recognize Patterns
    - Drawing parallels between training an AI model to recognize patterns and training your "Fast Brain" for coding.
    - Discussing the need for a library of components and patterns.
    - Example of building components and patterns using Backtracking.
    - 06:05 📚 Building Your Own Patterns
    - Emphasizing the importance of building your own patterns.
    - Suggesting resources and articles to help build patterns.
    - Highlighting that memorization alone is not sufficient; both "Fast Brain" and "Slow Brain" need to be trained.
    - 07:29 🌟 Beyond Leetcode: Mastering Interview Skills
    - Acknowledging the need for skills beyond Leetcode.
    - Encouraging practice and problem-solving.
    - Teasing the importance of additional skills for cracking coding interviews.

    • @AliinNITW
      @AliinNITW 3 місяці тому

      Now no need to watch video thanks 😂

  • @fahdii4u
    @fahdii4u 7 місяців тому

    Far out I'm stuck in this bat and ball analogy and after reading explanations in comments I still couldn't figure it out. Does that mean I can't be (or shouldn't be) a programmer?

  • @amalpp-tp8ww
    @amalpp-tp8ww 7 місяців тому

    I have this book

  • @MikeMcRoberts
    @MikeMcRoberts 7 місяців тому

    The way you pronounce develop is really funny

  • @jesseinfinite
    @jesseinfinite 8 місяців тому +2

    I just want people to understand, that to some people things WILL come more naturally than it will to others.
    And for a lot of people, no amount of hardwork will make you as good as the people to who it comes naturally.
    The faster you understand that and stop guilt tripping yourself, the better it will be for you and for your health.
    It doesn't make you worthless, it's just that you'll be useful in different roles than those people. And you can still do you part, but there might be somebody who'll be able to do the things you do faster, and in a way that you may never conceive. And you cannot learn that.
    The fast you realise that, the better it will be for you. Anybody that tells you that hardwork will make you as good as the person that it comes naturally to, is lying to you
    The only person you should compare yourself to is you. You can become better than you were.
    You can even be more productive than the genius.
    You can even produce better work than the genius, but you're not gonna be able to train yourself to become better at coming up with things that comes naturally to them.

    • @hhandle
      @hhandle 8 місяців тому

      The so called naturally gifted people just have the right framework which the hardworking people lack everyone is created equally but not everyone uses their full potential

    • @jesseinfinite
      @jesseinfinite 8 місяців тому

      @@hhandle no. Everyone is not created equal. Some people just have the innate ability to do certain things which others will have to work very hard to get to be able to do. And there's absolutely nothing you can do to change that.

    • @msddevotee9323
      @msddevotee9323 7 місяців тому

      ​@@jesseinfinitebut remember Hardwork beats talent

    • @jesseinfinite
      @jesseinfinite 7 місяців тому

      @@msddevotee9323 sure, but that doesn't mean that talented people can't work hard lol.

  • @lan1yaa_
    @lan1yaa_ 7 місяців тому

    I want to learn by myself from zero can i do it? 😅 it’s hard?!

  • @user-jc5rj7fm3n
    @user-jc5rj7fm3n 8 місяців тому +5

    If I want a road map on something this channel has I will recommend everyone subscribing very good❤❤

  • @aarchisardana9068
    @aarchisardana9068 8 місяців тому

    u want believe sir i used to think that i am dumb my mental ability is low then i camee across this book and when i saw this on thumbnail i was like wow

  • @adnanyeasir7965
    @adnanyeasir7965 8 місяців тому +3

    I got .10c as my answer :(

  • @mrvickyvignesh4694
    @mrvickyvignesh4694 8 місяців тому

  • @_quizroom
    @_quizroom Місяць тому

    How the answer is 5 cents?

  • @adrwtr
    @adrwtr 8 місяців тому +2

    why 5 cents and not 9 cents? i cant understand.

    • @little_warrior_
      @little_warrior_ 8 місяців тому

      It's 1 dollar high.. so both have same cents value (5 cents) + 1 dollar.

  • @anisfathima3163
    @anisfathima3163 8 місяців тому

    Guys i want to learn DSA , anybody can suggest any books or U tube channels for Learning.

    • @hhandle
      @hhandle 8 місяців тому

      Mycodeschool

  • @sach4539
    @sach4539 8 місяців тому +2

    i have been coding since 5 months , almost done with dsa and solved around 106 problems on leetcode but still I cannot solve questions on my own , i have to refer the solution, is this normal?? or i m not very good at coding? i am a first year student

    • @keylanoslokj1806
      @keylanoslokj1806 8 місяців тому +1

      You need to take on projects. Ones that you are passionate about. Only way for your brain connections to grow. Also exercise and walks in the park

    • @SumitKumar-qg4ps
      @SumitKumar-qg4ps 8 місяців тому +1

      Hate to break it to you, but it's not, 5 months is a lot of time to solve just 106 problems.
      However if your are talking about 106 hard level leetcode problem, then it's awesome

    • @SannaBS
      @SannaBS 8 місяців тому

      I felt the same but I am improving. You will improve. Because I also thought I can never do exercises by myself. But now I am able to do some by my self. Just try and read the solutions to the codes and then familiarize yourself with the logic they used to solve those exercises.😊

    • @SannaBS
      @SannaBS 8 місяців тому +1

      I felt the same but I am improving. You will improve. Because I also thought I can never do exercises by myself. But now I am able to do some by my self. Just try and read the solutions to the codes and then familiarize yourself with the logic they used to solve those exercises.😊

    • @CodeNinja18
      @CodeNinja18 8 місяців тому +1

      In 1 month I solve 39 easy 9 medium & 1 hard 😅total 49 😂 with continue streak of 29

  • @mrvickyvignesh4694
    @mrvickyvignesh4694 8 місяців тому

    It is very useful mu linde

  • @rahulbiswas3551
    @rahulbiswas3551 7 місяців тому

    overall you say that we brake the problems into smaller part but just say the one line you upload a 8 minutes video.

  • @ajaylodhi9061
    @ajaylodhi9061 8 місяців тому

    Create tech-news videos

  • @yolow8126
    @yolow8126 8 місяців тому

    How can I learn new things faster

    • @hhandle
      @hhandle 8 місяців тому +1

      By learning how to learn

    • @yolow8126
      @yolow8126 7 місяців тому

      Makes sense

  • @VolodymyrInTech
    @VolodymyrInTech 8 місяців тому

    👍😀😘

  • @SidhantKumar08
    @SidhantKumar08 8 місяців тому +9

    I am solving problems on leetcode for 3 days , but i feel very struggling even on the easy questions i am able to think some of the approaches to solve a question but when it comes to code that solution i struggle a lot 😭 is it normal ? btw I'm learning dsa from 3 months I'm in my 3rd sem

    • @charankoganti5764
      @charankoganti5764 8 місяців тому +9

      Well, rather than directly jumping to coding by yourself, analyze different codes for different problems that are available on different platforms. Make sure that you try to analyze why they have done a particular line of code that way. Do this for at least 15-20 days, by this way you'll build your confidence and you know the tricks as you have analyzed different codes. Taking your time is the key! Hope it helps.
      All the best!

    • @gokulnaththeboss08
      @gokulnaththeboss08 8 місяців тому

      There are UA-cam video where they solve leet questions

    • @thatdumbguy2800
      @thatdumbguy2800 7 місяців тому

      Go through this, there are videos linking the solutions as well.
      takeuforward.org/strivers-a2z-dsa-course/strivers-a2z-dsa-course-sheet-2/

    • @The_Aesthetic_Developer
      @The_Aesthetic_Developer 2 місяці тому

      Its normal bro . U have to practice more , experience more and do small and easy first

  • @Mdd181
    @Mdd181 8 місяців тому +1

    Pls tell how to die easily 🙏🙏

    • @hhandle
      @hhandle 8 місяців тому

      Stop eating

  • @lovebirds6629
    @lovebirds6629 8 місяців тому +2

    i am struggles a lot to solve one problem daily

  • @SahaSir-nl6mh
    @SahaSir-nl6mh 6 місяців тому

    Fast Brain + Slow Brain = BRAIN
    Basically use your BRAIN .
    thank me later.

  • @tarunteja5575
    @tarunteja5575 8 місяців тому

    0.05

  • @salmanharis2129
    @salmanharis2129 7 місяців тому

    I don't even understand bat and ball questions ❓ am i dumb 😭

  • @vamsikrishna2399
    @vamsikrishna2399 8 місяців тому

    Video on LinkedIn 😢

  • @amankumbhalwar
    @amankumbhalwar 8 місяців тому

    Help

  • @piyush-A.I.-IIT
    @piyush-A.I.-IIT 8 місяців тому

    slow brain = aptitude
    solve aptitude puzzles on your own to train your slow brain.

  • @austinjohnson7376
    @austinjohnson7376 20 хвилин тому

    TLDR Repetition

  • @sambeetburma6108
    @sambeetburma6108 8 місяців тому

    Rest 5 cents kya hai tax 😅

  • @GORE-ez7up
    @GORE-ez7up 8 місяців тому +1

    First comment ❤❤😊

  • @shivamrishinarayansingh1656
    @shivamrishinarayansingh1656 8 місяців тому +1

    can anyone please explain the bat and ball problem? sorry I didn't get it

    • @greenjacket6305
      @greenjacket6305 8 місяців тому

      The bat is $1 plus the cost of the ball. The total is the cost of the bat + the cost of the ball. So the total is $1 + the cost two balls. The cost of the ball is then ($1.10 -$1)/2.

    • @muhammadsaadmasood5762
      @muhammadsaadmasood5762 8 місяців тому +2

      ​@@greenjacket6305why are we dividing by 2? Where is second ball came from. Statement mentions only one ball

    • @nagrajsingh8437
      @nagrajsingh8437 8 місяців тому

      Bat +ball = $ 1.10 & Bat - Ball = $1,
      now subtracting both equation
      Bat + Ball -(Bat - Ball) = 1.10 -1,
      2Ball = .10, therefore
      1 Ball = .5 cent

    • @shivamrishinarayansingh1656
      @shivamrishinarayansingh1656 8 місяців тому +1

      @@nagrajsingh8437 buddy now I am more confused your solution doesn't work for me. And the question say a ball so i thought there will be 1 ball. Please correct me if I am wrong

    • @miyu8235
      @miyu8235 8 місяців тому

      The problem states that sum of bat price and ball price is $1.10. Also, cost of bat price is 1 dollar more than that of ball price. Find the ball price.
      Let ball price be x;
      Bat price = 1 + x;
      Bat price + ball price = $1.10 (given)
      //putting values
      (1 + x) + x = 1.10;
      2x = 1.10 - 1 = 0.10;
      x = 0.10/2 = 0.05;
      Hence ball price is 5 cent.
      Hope you got it 😇

  • @bappadityabera1959
    @bappadityabera1959 2 місяці тому

    now we are copying ai

  • @user-dy8ig3pq9w
    @user-dy8ig3pq9w 7 місяців тому

    Obviously slow

  • @KingKong-yj3nn
    @KingKong-yj3nn Місяць тому +1

    bro don't attach your pic in your LinkedIn post for no reasons, that's too cringe thing to do. I had to unfollow becuz of that shitt

  • @salmankhader1258
    @salmankhader1258 8 місяців тому

    Thanks for wasting my time

  • @ottomen2712
    @ottomen2712 8 місяців тому +2

    Clickbait! Dislike

  • @abhijith_mr
    @abhijith_mr 8 місяців тому +2

    Still now my slow brain hasn't figured out the reason for that bat and ball questions 🥲

    • @masudranadipu6915
      @masudranadipu6915 8 місяців тому +1

      bat cost is more than $1 from ball ,that means ball cost + 1$ = bat cost. means 5 cent (ball) + 5 cent & 1 $ (bat) =1.10$

    • @puneetgared
      @puneetgared 8 місяців тому +5

      X = Bat and Y = Ball
      x+y = 1.10
      x-y = 1 it means x = 1+y
      (1+y) + y = 1.10
      1+2y = 1.10
      2y = 1.10-1
      y = 0.10/2
      y = 0.5
      Ball cost = 5 Cents

    • @muhammadsaadmasood5762
      @muhammadsaadmasood5762 8 місяців тому

      ​@@puneetgaredlol such a tricky questions 😂

    • @muhammadsaadmasood5762
      @muhammadsaadmasood5762 8 місяців тому

      ​@@puneetgaredactually the statement is not correct and misleading to wrong answers if you listen closely..... slow brain says it