For those who didn't explain the bat and ball example ( don't forget he works at Google, so at his level this is like ABC thing for him, so he assumed it makes sense to all of us 😅): bat + ball = 1.1 since bat costs 1 dollar more than a ball, lets assume ball costs x amount, so cost of a bat is ( 1$ + x ), so if we fill in the cost of bat in the equation: (1+x) + x = 1.1 (we replaced ball with x, because we assumed x to be the cost of the ball) 2x = 1.1 - 1 2x = 0.1 x = 0.1 / 2 x = 0.5 hence, ball = 0.5
1. Use your slow thinking brain to solve problems 2. Break down the big mighty problem into smaller ones that you already know 3. You don't need to invent wheel again you need aware that where you can find solutions for your problems 4. Adapt to the new technology
you need to remember at least all tools you can do. In the real development, it does not about solving problems, it's about remembering. For example, you want to build the Todo list app. You have to remember what tool can create the list. Which make this better than the other tools. Then when you use this tool, you need to remember the syntax to write the code. The more you remember, the faster you write code.
I recently started coding and I saw a veteran programmer giving a talk on how to think like a programmer. He took off his shoe off and said something along the lines of: 'Your computer is as smart as this shoe' He meant that you need to tell a computer VERY EXPLICITLY what to do.
Awesome explanation! Great animations! Good to help us realise how not to reach quick, hasty solutions but rather think stuff through and break complex things down to simpler ones and approach problems sensibly
Let the price of the ball be x Then price of the bat is 1+x Price of bat+ball = (1+x) + x = 1.10 (1+x) + x = 1+ 2x = 1.10 2x = 1.10 -1 2x = 0.10 x = 0.05 = 5 cents (price of the ball)
@@NashrinFathima-oh7ji because he said the bat costs 1 dollar more than the price of ball so if ball price is x then it makes the bat price 1 dollar + x.
B@@NashrinFathima-oh7ji Because the bat price is 1 dollar greater than ball Here the condition is 1.10 so the we conder 1 +x Next we don't know what is value of bat and ball so that is why consider the both things are x
bat + ball = $1.10 => - $1 => $0.10 / 2 => ¢0.05. I have a problem with my algorithmic thinking 🥲 When they give us a more complex task with a one-page description (at university) I just switch off and don't know where to start. I know that with practice everything will be fine, but now it's very demotivating especially since most handle these tasks 😤Greetings from Bulgaria 🙂
$1.10 - the price of the ball = the price of the ball + $1.00 If we rearrange the equation, we get: 2 * the price of the ball = $1.10 - $1.00 2 * the price of the ball = $0.10 If we divide both sides by 2, we get: the price of the ball = $0.10 / 2 = $0.05 Then the price of the bat equals the price of the ball + $1.00, or $0.05 + $1.00, which equals $1.05. So, in the end, the bat costs $1.05, and the ball costs $0.05, and together they are $1.10, as stated in the initial data.
Watching the code script at 1:52 i started reviewing my plans! If coding needs logic of factorial, variable, integers etc and more of algebra on day to day operations its going to take years for me to excel it while working on a 10 hours job and 24hrs family commitment! 😢
100% knowledgeable contant at every single second The tutor we want in our society which motivates today students to be good carrier for future And we have a responsibility to support people like them. Thanks you sir for your great support plz stay connected is bcoz the contant and good way of working you give is gives us a positive vibes to start from scratch to build a good skilled mindset ❤❤ Sir stay connected with us love 💕 from India,M.P🇮🇳🇮🇳
@@sahilandsarra please can you become my mentor in programmer am still a boy of 14 years old eager to learn multiple languages although I know HTML Css want to learn flutter & dart python etc c++ JavaScript java pls help me Sir
What if your currency has 1c and 2c pieces….? The Bat and Ball question makes an assumption which is what I see trips up a LOT of programmers. If you want to break the ‘technical rules’ of a programming system then you’re going to have to learn to transcend the limitations of many of the assumption’s/interpretations of those rules your own mind may ‘incorrectly’ be imposing on the question/problem - not the rules themselves.
Sure, you don’t have to reinvent the wheel for something, but that depends on what you need. I’m not going to import an entire library for something small and then have to deal with 3rd party maintenance on something I can simply do myself and conserve space.
bat+ball =1.10 The bat is 1 dollar more than the ball __________________________________ so bat=(1+ball) I substituted it in the equation ---------------------------------- 1+ball+ball=1.10 2ball = 0.10 ---------------------------------- ball = 0.05 bat = 1.05 And this is counterintuitive. Without reasoning in "slow mode", I would say "ball=0.10" immediately.
0:22 How do humans solve this problem? To be honest, before learning programming I would just pay someone on Fiver to do it for me, or if it was a test question I would rather skip and take the failing grade.
the fast and slow brain thing it reminds me when i used to play chess sometimes i used to take quick decisions and late decisions. and often lose when took quick decisions and the more i take time in decision making the better i got in new planing strategies.
This is why I came here😂!! I've tried two problems now, for 30mins, I could not type a line past a variable declaration. But when I close it, I know I know java syntax, but okay...what now happens when I open leetcode and read all these questions😂
Personally i think everyone should start caring about this when they reach oop because oop requires a lot of basically knowing your stuff you need to know where to find and apply something you builded and it gets tougher as the classes increase in quantity i personally am learning most of my coding logic there i recommend people start with java becaude java really teaches you the sorcery of oops ofc dont just make simple classes make something harder like a game engine
If we assume the cost of the ball is $0.10, let's see if it satisfies the conditions of the problem: Cost of ball is $0.10. The bat costs $1 more than the ball, so the bat costs 0.10 + 1 = 1.10 Now, let's add the cost of the ball and the bat: 0.10 + 1.10 = 1.20 The total cost comes to $1.20 --- not the same as the problem's given total of $1.10 So yes, you need to do the math.
If you want to learn Web Development then learn JavaScript or if you want to learn App Development or Backend only then Java is also a good choice. And don't waste time choosing a language pick one learn it along with DSA then make some projects and also practice DSA questions too. Switching to another language is easy if you have already learnt any language in full details
Where did the 5 cents go Irl that doesn't make sense If you buy a bat and ball 1.10 and separately it is 1.05 why would i opt to loose 5 cents Can someone explain this to me
Steps 1. Break down a complex problem (here 1 to 9) to smallest possible problem,here it could've been 1 ,but in example it was (1 ,2) 2. Increase the size of the problem,here it went from 1,2 to 1 to 3. 3. Continue this until you find the pattern, or relation between the problems , this is the main part , he used recurrence relation notations, you can use simple variables as well
Find a relatable video for some new programmer generation just of because they think it's only about the doing things solve any things in any away but it all about thinking
Your videos are helping a lot! ⭐⭐ In between I would like to make a request that may you please make a video on how to revise data structures and algorithms as we practice lot of questions while completing the course but it is not possible to revise all the notes and the questions before the interview. 🙏🙏 Thanks a lot. Love you 3000 ❤❤
I know the logic and idea but while implementing the logic, I face problems. I can't implement that logic in my code. What should I do? Can u please help me, sir?? Love from Nepal🇳🇵
I would say then your logic isnt fitting to solve the problem after all and / or you missing something. It could be that you havent wrote enought code yet to implement that specific logic and you are missing the tools to achive that. Try to indentify following: does my code have syntax issues or a typo if no , and your code works fine and still doesn't produce the expected results, it might be time to reconsider your initial logic. Try to use your set of "tools" to develop your logic and later you can always refactor. Usually what helps me that i get my rubber duck (Rubber duck method) then I go inside of the debugger and line by line look at how my function / application works.
Dinesh always makes me smile! 😃👍 Great video, really helped me see my false thinking concerning programming. A similar weird thing happened with scientists watching zebras. They couldn't figure out why they didn't have a better camouflage. Why were they so black and white, why didn't nature make them a colour to blend in the landscape. But they quickly found out that they themselves had problems telling the zebras apart. So they put a stripe of red paint on the animals to distinguish them. This was a bad idea, because it helped the lions too and these marked animals were quickly killed and eaten. Sometimes hiding in plain sight is best. 😂
“In programming, you don’t need to know everything. You just need to know where to find it, when you need it.”
true, but we need to have a good problem solving skill and good logic approach
@@pierofa143 How to develop that??
Dont be the best, just know how to copy from the best
@@shouryakumar9824studying math, solving problems and practicing
MY bookmark be like : why the hell is this not ending
For those who didn't explain the bat and ball example ( don't forget he works at Google, so at his level this is like ABC thing for him, so he assumed it makes sense to all of us 😅):
bat + ball = 1.1
since bat costs 1 dollar more than a ball, lets assume ball costs x amount, so cost of a bat is ( 1$ + x ), so if we fill in the cost of bat in the equation:
(1+x) + x = 1.1 (we replaced ball with x, because we assumed x to be the cost of the ball)
2x = 1.1 - 1
2x = 0.1
x = 0.1 / 2
x = 0.5
hence, ball = 0.5
You, too, don't seem to be less than a google employee 😂
@@abhijeetdesai4097 actually :)
Dude, it was a basic math wtf
Anyone who've done algebra in their childhood will know to take x & x+1 as inputs...
hello bro , there's a typo , 0.1 / 2 == 0.05 right and since we are asked in cents , 0.05 means 5 cents as 100 cents means 1 dollar
What happened to the 5 cents irl that's a loss
1. Use your slow thinking brain to solve problems
2. Break down the big mighty problem into smaller ones that you already know
3. You don't need to invent wheel again you need aware that where you can find solutions for your problems
4. Adapt to the new technology
you need to remember at least all tools you can do. In the real development, it does not about solving problems, it's about remembering.
For example, you want to build the Todo list app. You have to remember what tool can create the list. Which make this better than the other tools. Then when you use this tool, you need to remember the syntax to write the code. The more you remember, the faster you write code.
I recently started coding and I saw a veteran programmer giving a talk on how to think like a programmer. He took off his shoe off and said something along the lines of: 'Your computer is as smart as this shoe' He meant that you need to tell a computer VERY EXPLICITLY what to do.
Was this in a video? if so, where can I find it?
Awesome explanation! Great animations! Good to help us realise how not to reach quick, hasty solutions but rather think stuff through and break complex things down to simpler ones and approach problems sensibly
This explanation is not for beginners!
😂😂😂😂
I know it for babies 😂
True
Thanks. I already felt stupid
i agree
Breaking down problem into smaller chunks really helps and I've solved many problems with this simple approach.
How the hell do you even do that?
This video is not for beginners, it's for those who know everything …… and he speak very fast.
Let the price of the ball be x
Then price of the bat is 1+x
Price of bat+ball = (1+x) + x = 1.10
(1+x) + x = 1+ 2x = 1.10
2x = 1.10 -1
2x = 0.10
x = 0.05 = 5 cents (price of the ball)
Thanks for sharing.
TBH, why we take bat as 1+ x?
@@NashrinFathima-oh7ji why not?
@@NashrinFathima-oh7ji because he said the bat costs 1 dollar more than the price of ball so if ball price is x then it makes the bat price 1 dollar + x.
B@@NashrinFathima-oh7ji
Because the bat price is 1 dollar greater than ball
Here the condition is 1.10 so the we conder 1 +x
Next we don't know what is value of bat and ball so that is why consider the both things are x
Really liked the reference made to the book "Thinking Fast and Slow" . One of the best books for learning about human cognition and heuristic bias
bat + ball = $1.10 => - $1 => $0.10 / 2 => ¢0.05. I have a problem with my algorithmic thinking 🥲 When they give us a more complex task with a one-page description (at university) I just switch off and don't know where to start. I know that with practice everything will be fine, but now it's very demotivating especially since most handle these tasks 😤Greetings from Bulgaria 🙂
Hi greetings from India, why it's getting divided by 2
$1.10 - the price of the ball = the price of the ball + $1.00
If we rearrange the equation, we get:
2 * the price of the ball = $1.10 - $1.00
2 * the price of the ball = $0.10
If we divide both sides by 2, we get:
the price of the ball = $0.10 / 2 = $0.05
Then the price of the bat equals the price of the ball + $1.00, or $0.05 + $1.00, which equals $1.05.
So, in the end, the bat costs $1.05, and the ball costs $0.05, and together they are $1.10, as stated in the initial data.
@@emil_petkov_py god damn, im just a dumb nigga i guess
@@emil_petkov_pygreat reply and explanation. ❤
@@keentoknowher give up and work in a call centre
I already exhausted by thinking logic
And after watching this video my mind is blast
Watching the code script at 1:52 i started reviewing my plans! If coding needs logic of factorial, variable, integers etc and more of algebra on day to day operations its going to take years for me to excel it while working on a 10 hours job and 24hrs family commitment! 😢
0:15 the question looks like to be a question with a logical solution
this guys is gem. keep the great content up sir
100% knowledgeable contant at every single second
The tutor we want in our society which motivates today students to be good carrier for future
And we have a responsibility to support people like them.
Thanks you sir for your great support plz stay connected is bcoz the contant and good way of working you give is gives us a positive vibes to start from scratch to build a good skilled mindset
❤❤
Sir stay connected with us love 💕 from India,M.P🇮🇳🇮🇳
Very immersive animations. Loving this style of explanation, Sahil!! 🔥
bat + ball = 1.10
bat = ball + 1
ball + 1 + ball =1.10
2ball = 1.10 - 1
2ball = 0.10
ball = 0.10 / 2
ball = 0.05
This is the proper video man. Respect. Well explained and delivered 👏👏👏
Thanks
@@sahilandsarra please can you become my mentor in programmer am still a boy of 14 years old eager to learn multiple languages although I know HTML Css want to learn flutter & dart python etc c++ JavaScript java pls help me Sir
Guess it's an inspiration from veritasium science of thinking thumbnail. Good work bro. Keep going. I am getting lot of insights from your videos.
What if your currency has 1c and 2c pieces….?
The Bat and Ball question makes an assumption which is what I see trips up a LOT of programmers. If you want to break the ‘technical rules’ of a programming system then you’re going to have to learn to transcend the limitations of many of the assumption’s/interpretations of those rules your own mind may ‘incorrectly’ be imposing on the question/problem - not the rules themselves.
Sure, you don’t have to reinvent the wheel for something, but that depends on what you need. I’m not going to import an entire library for something small and then have to deal with 3rd party maintenance on something I can simply do myself and conserve space.
Damn
This is the best video related to programming
is this video ai generated?
Yep
@@Wakpinside doesn't look like it. how are you saying it's ai generated?
@@Wakpinside No it's not. He talks like this only.
Showing water in a tea pot before saying it becomes the tea pot while talking about becoming what youre formed to, blew my mind.
Sahil! What your are telling is amazing
This is a great explanation for some of the code I have seen but couldn't understand how or why they did it.
This is called quality content
bat+ball =1.10
The bat is 1 dollar more than the ball
__________________________________
so bat=(1+ball)
I substituted it in the equation
----------------------------------
1+ball+ball=1.10
2ball = 0.10
----------------------------------
ball = 0.05
bat = 1.05
And this is counterintuitive.
Without reasoning in "slow mode", I would say "ball=0.10" immediately.
Thank for explaining it better.
0:22 How do humans solve this problem?
To be honest, before learning programming I would just pay someone on Fiver to do it for me, or if it was a test question I would rather skip and take the failing grade.
the fast and slow brain thing it reminds me when i used to play chess sometimes i used to take quick decisions and late decisions. and often lose when took quick decisions and the more i take time in decision making the better i got in new planing strategies.
U deserve more than million subscribers that's what I feel
Thanks 🙏
This is helping me alot to solve leetcode problems
This is why I came here😂!!
I've tried two problems now, for 30mins, I could not type a line past a variable declaration.
But when I close it, I know I know java syntax, but okay...what now happens when I open leetcode and read all these questions😂
Personally i think everyone should start caring about this when they reach oop because oop requires a lot of basically knowing your stuff you need to know where to find and apply something you builded and it gets tougher as the classes increase in quantity i personally am learning most of my coding logic there i recommend people start with java becaude java really teaches you the sorcery of oops ofc dont just make simple classes make something harder like a game engine
U cluster bits and pieces of all the information described in early content and implement in ur video which Is smart as well as effective...!
This has been really insightful!💕
Amazing... What a research, What a explanation, What a content you providing is really Amazing ❤❤ Thanks. You are a Practical Professor.
Excellent , elegant , filled with information and productivity and the royalness in teaching , Thanks for such a information. #PowerCouple #Supercode
You are the best all time keep going you help lot young people wanting going far in programming you are inspiration for them thanks
Thanks 🙏
Damn, this is great 💪
Nice video Thanks for sharing
Thanks ❤️
Great video
Thx for adding Bruce Lee statement ❤
Could you please make a video about chatgpt and the future of programming?
Amazing content... you explain like a pro.. wonderful animations and presentation...thanks
Thanks 🙏
Excellent video, thank you!
Bat : $1.05 and ball : $0.05
Otherwise bat:$1.01 and ball : $0.09 and so on
..but the bat's price should more than 1 doller
Correct the ball is $0.05
Price of bat is $1.05 and ball is $0.05, I used system of equations btw.
One of your best videos
bat + ball = 1.1
ball + 1 = bat
=> 2 * ball + 1 = 1.1
=> ball = 0.05
=> bat = 1.05
Nice sharing👍👍👍
Thanks 🙏
Love your video
Can you like make a mock technical interview video, where you show how you would go about a coding interview.
If we assume the cost of the ball is $0.10, let's see if it satisfies the conditions of the problem:
Cost of ball is $0.10.
The bat costs $1 more than the ball, so the bat costs
0.10 + 1 = 1.10
Now, let's add the cost of the ball and the bat:
0.10 + 1.10 = 1.20
The total cost comes to $1.20 --- not the same as the problem's given total of $1.10
So yes, you need to do the math.
Can you explain more how ball will costs only 5 dollar?
Not bad, I'm in it!
Bro am a man without cs degree ,As a beginner ,I have a confusion to choose between javascript or java
If you want to learn Web Development then learn JavaScript or if you want to learn App Development or Backend only then Java is also a good choice. And don't waste time choosing a language pick one learn it along with DSA then make some projects and also practice DSA questions too. Switching to another language is easy if you have already learnt any language in full details
@@farhanashraf8962 thx bro
You'd be good recursion teacher
Very good video 🔥
your videos are so beautiful and inspiring thank you
Where did the 5 cents go
Irl that doesn't make sense
If you buy a bat and ball 1.10 and separately it is 1.05 why would i opt to loose 5 cents
Can someone explain this to me
The Bruce Lee quote is referring to philosophy from Sun Tzu's The Art of War.
Sir ,did u have any sheet code for improving problem solving in leet code
Which application do you use for animations in your videos?
great explanation
That was great
Nice Video
Nice Vid 👍, Bcome the water ♥
Amazing one
Why this video is going over from my head 😅
Very confusing explaining
Steps
1. Break down a complex problem (here 1 to 9) to smallest possible problem,here it could've been 1 ,but in example it was (1 ,2)
2. Increase the size of the problem,here it went from 1,2 to 1 to 3.
3. Continue this until you find the pattern, or relation between the problems , this is the main part , he used recurrence relation notations, you can use simple variables as well
True agreed! Ppl who hate paths n problem solving would give up in the middle ,😂
6:17 bro gave a NCERT biology book example of natural selection
Please give us Roadmap for Ethereum blockchain development
Just wow...❤❤
❤️❤️
Great ❤️🔥
Question where exactly you need to apply in code ?
I am such a bad programmer and I realized this when I could not even understand your video when you explain n digits 😪
Sir I am BCA third semester student I still don't know coding what should I do give any suggestion
Your style of explanation is really good.
Thanks 🙏
Find a relatable video for some new programmer generation just of because they think it's only about the doing things solve any things in any away but it all about thinking
Your videos are helping a lot! ⭐⭐ In between I would like to make a request that may you please make a video on how to revise data structures and algorithms as we practice lot of questions while completing the course but it is not possible to revise all the notes and the questions before the interview. 🙏🙏
Thanks a lot.
Love you 3000 ❤❤
Thanks a lot for sharing, Sahil ❤
could you please make a video about web development and software development?
Thanks 🙏
I know the logic and idea but while implementing the logic, I face problems. I can't implement that logic in my code. What should I do? Can u please help me, sir??
Love from Nepal🇳🇵
I would say then your logic isnt fitting to solve the problem after all and / or you missing something. It could be that you havent wrote enought code yet to implement that specific logic and you are missing the tools to achive that. Try to indentify following: does my code have syntax issues or a typo if no , and your code works fine and still doesn't produce the expected results, it might be time to reconsider your initial logic. Try to use your set of "tools" to develop your logic and later you can always refactor. Usually what helps me that i get my rubber duck (Rubber duck method) then I go inside of the debugger and line by line look at how my function / application works.
Thanks
Bro explained pure mathematics of class 11 ( pnc)
What you have said does not apply to timed coding exams
Why did i use simultaneous equations to calculate the answer for the bat ball problem 😂
I got the right answer
Nothing to say you content is alway great
So copy and paste really is half the battle.
Then why all are they conducting aptitude test in recruitment process
Evolution is just a theory which isn't 100% correct. 😅
Become water my friend
Can anyone explain to me why the answer is 5cents?
a true fun fact : you need to become a nerd to excel in cs field
1+2x=1.10 then find x😊
Dinesh always makes me smile! 😃👍 Great video, really helped me see my false thinking concerning programming. A similar weird thing happened with scientists watching zebras. They couldn't figure out why they didn't have a better camouflage. Why were they so black and white, why didn't nature make them a colour to blend in the landscape. But they quickly found out that they themselves had problems telling the zebras apart. So they put a stripe of red paint on the animals to distinguish them. This was a bad idea, because it helped the lions too and these marked animals were quickly killed and eaten. Sometimes hiding in plain sight is best. 😂
You said more that could be 9 to 1 cents
Video already in 1x speed 😢
Why am feeling uncomfortable to see him directly.
why the answer is 5 cents? anyone can explain?
The question literally means exactly one dollar. The question is badly structured on purpose. 1.05 - .5 = 1 but 1 - .1 = .90, I was confused as well.
first principles thinking or as known among programmers balanced binary tree 😂😂😅