No video

Three Sum Closest (LeetCode 16) | Full Solution with visual explanation | Interview Essential

  Рет қаралды 16,396

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Actual Problem: leetcode.com/problems/3sum-cl...
Chapters:
00:00 - Intro
00:50 - Problem Statement and Description
03:20 - Brute Force Solution
03:59 - Translation to Three Sum
05:16 - Efficient Solution
08:23 - Dry-run of Code
11:12 - Final Thoughts
📚 Links to topics I talk about in the video:
Three Sum: • 3 Sum (LeetCode 15) | ...
Two Sum: • Two Sum (LeetCode #1) ...
Brute Force Solution: • Brute Force algorithms...
What is Big O?: • Big O Notation Simplif...
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: github.com/nikoo28/java-solut...
Test-cases on Github: github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: amzn.to/36pU0JO
Favorite book to understand algorithms: amzn.to/39w3YLS
Favorite book for data structures: amzn.to/3oAVBTk
Get started for interview preparation: amzn.to/39ysbkJ
🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: amzn.to/3pAqh8O
Microphone: amzn.to/2MCX7qU
Recording Camera: amzn.to/3alg9Ky
Tablet to sketch and draw: amzn.to/3pM6Bi4
Surface Pen: amzn.to/3pv6tTs
Laptop to edit videos: amzn.to/2LYpMqn
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: studyalgorithms.com/feed/
Join fan mail: eepurl.com/g9Dadv
#leetcode #programming #interview

Пікірлер: 24
@hoddybhaba6704
@hoddybhaba6704 Жыл бұрын
Great explaination bro however you have a typo in space complexity i guess as it will be O(1)
@nikoo28
@nikoo28 Жыл бұрын
You are absolutely correct. The space complexity will be O(1). Thanks for pointing that out. :)
@sureshkannan6313
@sureshkannan6313 8 ай бұрын
You're Such an understandable and clear explanation delivering instructor...Thank you.!!!
@vipulaggarwal8518
@vipulaggarwal8518 5 ай бұрын
Your way to explain the approach and code is phenomenal. Thanks you Sir for providing great content 😊❤❤
@pavanreddy3460
@pavanreddy3460 6 ай бұрын
You are explaining the problem clear and crisp.. keep doing the same... Thanks for sharing these videos
@nikoo28
@nikoo28 5 ай бұрын
So nice of you
@NiteshMaurya1111
@NiteshMaurya1111 7 күн бұрын
your explaination is too good
@ghanashrim2839
@ghanashrim2839 Жыл бұрын
I watched your house robber I problem explanation video first, and immediately fell in love with the way you explain the solutions. Your voice is soothing to hear as well and every word is clearly pronounced. I've had issues following other videos due to terrible audio quality and a monotonous tone of explanation. Thank you for making my life a bit easier with your solutions. Please solve all the problems from Sean Prashad's list 🙏
@nikoo28
@nikoo28 Жыл бұрын
Do you feel the audio problem in the recent videos too? All the ones I created House Robber 1? I know some of the earlier videos had a problem. Thanks for your kind words though :)
@ghanashrim2839
@ghanashrim2839 Жыл бұрын
@@nikoo28 Oh no, I meant, I had problems following other KZbinr's videos. I haven't faced issues with your videos so far :)
@geetikapathak
@geetikapathak Жыл бұрын
very good explaination sir. thanks for your contribution
@ujjwalsingh6889
@ujjwalsingh6889 5 ай бұрын
Great Explanation bro👌👌 I like your teaching method..........👍
@saurabhc4278
@saurabhc4278 10 ай бұрын
Awesome number line intuition !!
@nikoo28
@nikoo28 9 ай бұрын
Thank you!
@Pankaj_singh15
@Pankaj_singh15 10 ай бұрын
I was thinking of the same approach but couldn't find that last piece but after watching this video i got it, Thankyou this video was very helpful !
@nikoo28
@nikoo28 9 ай бұрын
glad it helped you
@sanand6084
@sanand6084 Жыл бұрын
Awesome as usual ! Can you please make a video which sort of gives a general approach to solve questions involving two pointers ?
@nikoo28
@nikoo28 Жыл бұрын
Great suggestion!
@AnandL-yb2sg
@AnandL-yb2sg Ай бұрын
Thanks...
@subee128
@subee128 7 ай бұрын
Thank you
@subhendumahanta3717
@subhendumahanta3717 8 ай бұрын
if sum is less than the target, we have 2 options: increment left or decrement right. You have chosen to increment left. I can choose decrement right. Are the equivalent ?
@nikoo28
@nikoo28 7 ай бұрын
Is sum is less than target, and you decrement right…the sum will become even smaller..because the array is sorted. So you will get a smaller sum
@jayeshpatil5757
@jayeshpatil5757 Ай бұрын
Thanks 20 June 19:02
@Keraman9
@Keraman9 4 ай бұрын
friend, remove the apple logo in your video, put the known one not this shit Thanks for the explanation beside that
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 104 МЛН
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 5 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 60 МЛН
DSA Phir se with Sumeet | Leetcode 16 | 3Sum Closest
11:27
Pepcoding
Рет қаралды 1,7 М.
Max Consecutive Ones (LeetCode 1004) | Full Solution w/ animations
14:41
3 Sum | Brute -  Better - Optimal with Codes
38:25
take U forward
Рет қаралды 270 М.
How to Respond to Different Situations in English
10:48
Learn English with Bob the Canadian
Рет қаралды 10 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 633 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 104 МЛН