This is probably the best video I've seen on coding interviews. It covers: 1. Precise, insightful questions 2. Concise, targeted answers with helpful tips 3. Clear, visually appealing graphics and examples that make complex topics easy to understand 4. A real-world example and code walkthrough to demonstrate the solution in action
@Sailgodgreenearth2 жыл бұрын
The best part of this video is showing how to identify where to apply it. Great Explanation overall
@tribaldeni Жыл бұрын
Thanks for explaining perfectly. You were talking about asking the interviewer or using another ds. I came up with another solution, especially if it’s not sorted it’s technically O(n) . You convert the array to an object/hash map , you map the number to index and then loop over the array, you minus the target from the number at array index where your loop is currently at, you try to get if you can then return the indexes. It’s O(n+n) which is 0(n). But two pointers is totally better
@rajatsharma659711 ай бұрын
nice visualisation and great technique with binary search
@aditya98965 ай бұрын
This was the best explanation for me, understanding to approach a problem and optimising it later is the key, Thank you for showing the application on solution very helpful, subbed
@JananiVA18 күн бұрын
Awesome Explanation.
@zacherywagner11897 ай бұрын
O(N) is not > than O(N Log n)
@anishbhalla51014 ай бұрын
I think he meant O(N^2) > O(N logn))
@lalalanding2342 ай бұрын
No @@anishbhalla5101
@wandilencongwane3621Ай бұрын
Mybe they just meant greater time efficiency
@slime_king5324Ай бұрын
They put in there in a sense that is better. But yeah it's very ambiguous.
@surya.r346310 ай бұрын
thank you so much sir Such a great and simple way of explanation
@brianwsmithers5 ай бұрын
Thanks for the video. I enjoyed the explanation. My only recommendation would be for you to run the coding example in an IDE using the debugger. It would be easier to visualize each step of the algorithm since the operations would appear on screen.
@HR-pz7ts Жыл бұрын
This code is clean and makes so much sense. Thank you for sharing!
@sampreethadixith980Ай бұрын
Brilliant explanation!!
@yankomirov42908 ай бұрын
This was very well explained, thanks!
@Frizen8811 ай бұрын
the rum time animation in 4:37 is not accurate shouldn't move the front pointer until the current sum is smaller then target, as your code says. but nice video, thanks
@pascal98148 ай бұрын
Yes
@uknow29082 жыл бұрын
Thank you very much. Very descriptive video!
@12371eric Жыл бұрын
I'm fairly new to this concept, I understand that you return an array of size 2 with the current index locations of the 2 values that equal our sum. However, I don't understand why you add one to these indexes? I solved this problem in Java and adding one to the indexes returned the wrong value. Is this just how the language you are using functions?
@bocbinsgames6745 Жыл бұрын
That's how the leetcode question is worded.
@ajmdz2 жыл бұрын
Hi. What software do you use for these visualizations? It looks a lot like 3blue1brown's
@elixpo Жыл бұрын
It's manim, a python library
@darkknight39294 ай бұрын
great one
@omj711310 ай бұрын
Thank you! It helps!😊
@marioprado8789 Жыл бұрын
Thanks!, Logré resolver el problema de los contenedores de agua luego de ver su video.
@louievasquez60092 жыл бұрын
when returning the two indicies, why add 1 to both? 2 and 7 were at indexes 0 and 1 respectively so confused why you have to add the 1
@Meeko11232 жыл бұрын
I was really confused too. The problem has a note "Your returned answers (both index1 and index2) are not zero-based." so I think they're adding 1 to account for this note. It's a weird note, though.
@aadhuu Жыл бұрын
@@Meeko1123 yup look at the first example. [1,2] was the answer
@gunahawk68932 жыл бұрын
Great one
@davidtran76094 жыл бұрын
Can you go topological sort next?
@JoshsDevBox4 жыл бұрын
Thanks for the suggestion! You'll be happy to know that it is in the backlog of topics that we will cover in the future!
@bullymaguire233522 күн бұрын
i didnot understand the binsearch solution at all can someone explain
@Nani-cf3sw2 жыл бұрын
It will work only for unique elements
@kundan_28Ай бұрын
Good explanation. But you should have more animations to track the different variables you're describing. Also, the two people talking thing isn't good.
@pandi58932 ай бұрын
if 3Brown1Blue made coding videos
@wizardgaming1635 ай бұрын
This was the worst video
@lalalanding2342 ай бұрын
Usually the base is less than 4. So for higher values n, n*log(n) becomes greater than n. And that is why O(nlogn) > O(n). * From Google *