I would love to see more of these. It's a nice addition to your other types of videos.
@WebDevSimplified
5 жыл бұрын
Thanks. I definitely plan to continue with this series.
@neliyagurung4584
3 жыл бұрын
@@WebDevSimplified u stopped making these
@kran399
3 жыл бұрын
@@WebDevSimplified They why Stopped making this Series. your broken your Promise 🙄
@WebDevSimplified
5 жыл бұрын
Thanks for watching! If you enjoyed the video please let me know, because I would love to make more videos about algorithms. Also, don't forget to tryout the algorithm yourself on LeetCode, and view my code from this video on my GitHub. LeetCode: leetcode.com/problems/two-sum/ GitHub: github.com/WebDevSimplified/JavaScript-Algorithms/tree/master/Two%20Sum
@MrVolkodaff
3 жыл бұрын
This is just a great explanation, algorithms are still a weakness in my code. Thanks for the explanation, Kyle. Enjoy your videos, man.
@thedude142
4 ай бұрын
Almost every time im looking up a programming concept on here, without fail, i find you covering it. Thank you for all you do 🤙
@itsyourronit
2 жыл бұрын
I really enjoyed it, no jargons, nothing that already makes someone feel sick, everything so simplified, I love this channel and the way Kyle tells stuff! It goes directly inside of my brain and resides there permanently
@Train3816
3 жыл бұрын
Please keep making videos! I’ve been binge watching your channel every chance I get. I’ve truly learned so much, thank you!
@erinrose5794
2 жыл бұрын
I would love more algorithm videos! I'm fairly new to coding and this is really helpful for prepping for interviews
@skafaced102
Жыл бұрын
I've been using "Cracking the Coding Interview" (although dense, this is a great book to have) and ZTF Master the Coding Interview: Data Structures + Algorithms on Udemy! The udemy course is great because the instructor breaks big O and fundamental algos down for you as well as how to approach each data structure. However I use Web Dev Simplified all the time! He knows how to explain useful tools quickly and efficiently. Thought I would at least share some additional resources I've felt helpful for me as I prepare for interviews.
@RakeshKumar-vg7uv
3 жыл бұрын
Video is short and simple but powerful. Thank you so much for making your videos short and always straight to the point
@bartekfigatowski7980
5 жыл бұрын
I liked it, more algorithms, please😁👍🙏
@WebDevSimplified
5 жыл бұрын
Will do!
@crestmarinaris6113
5 жыл бұрын
This is super insightful. =) No other channel goes through algorithm and challenged so elegantly. Thank you for the video. Would love to see more of these.
@WebDevSimplified
5 жыл бұрын
Thanks. I am already planning out the next video.
@veremox
3 жыл бұрын
omg man, that way of doing this challenge is mind blowing! i am new to js and god, i've learned a lot just by watching it, interpreting the algorithm and then redoing it by myself!! very awesome!!!! this way of storing past values on a object like its a mapped bucket of information is incredible! opened a lot of doors in my head :O thanks! =)
@jasper5016
2 жыл бұрын
OMG, Can you believe that I was looking for the exact problem? Thanks a lot
@miw879
3 жыл бұрын
I was struggling from one tutorial to another with there complex code, but I swear to god I'm not even lying when I found your video first I smiled because I was already damn sure that now I'm gonna understand it for sure because there is no questioning YOU ARE THE BEST TEACHER. I instantly knew I'm gonna get this now go my notebook up wrote with you and now I fully understand it..... From the bottom of my heart, THANK YOU VERY MUCH ❤ Please upload more algorithms from leetcode!
@georgemccaddeniii8963
5 жыл бұрын
Thank you for this video, Kyle. I'm preparing for some big interviews and I wanted to see this problem white boarded and coded out. You helped me really understand this approach and now I'll build upon this knowledge when working through others like it.
@WebDevSimplified
5 жыл бұрын
I'm really glad I could help
@mahrig1829
5 жыл бұрын
Agree with other comments. Very happy to see these kind of videos (more advanced Javascript, problem solving, algorithms). Another great video!
@WebDevSimplified
5 жыл бұрын
Thanks. I plan to make more videos like this of all difficulty levels.
@zecosta9579
5 жыл бұрын
Great tutorial, I think a series of this would be well received
@WebDevSimplified
5 жыл бұрын
Thanks. Based on how well received this video has been a series is highly likely.
@zecosta9579
5 жыл бұрын
@@WebDevSimplified That's awesome!
@NirajKumar-bi5vo
Жыл бұрын
Enjoyed your algorithm videos. Keep making more of such videos
@bac9982
2 жыл бұрын
Stellar video. Even as a Python guy you make the concepts easy to understand and the whiteboard breakdown was great. Thanks for making the time to make these and for sharing the knowledge with the world!
@adriandeaconu5468
5 жыл бұрын
Mate, I love your videos, you are very talented, keep up the good work. Like honestly, I watch plenty of channels just to stay in touch with different programming languages, but for some reason, you got me hooked up.
@WebDevSimplified
5 жыл бұрын
Thank you! I really appreciate it.
@abhijeetgupta2754
5 жыл бұрын
One of the best youtube channel for learning good stuff and I would like to see more videos like this.
@WebDevSimplified
5 жыл бұрын
Thanks. My next video will be another algorithms video. I hope you enjoy it.
@alicenyw1872
Жыл бұрын
I loved this! I never had to use algorithms before, but the job market seems to be more competitive right now, so I am encountering algorithms during interviews.
@shelbyrothman4522
2 жыл бұрын
Everything you do is gold!
@baefaux
3 жыл бұрын
I've been teaching myself to code with JS and I actually understood what you were explaining! I can't wait till I write a program that I can implement this in!
@pandat2473
Жыл бұрын
Need more content like this sir😭💖 This is really good please make some more videos like this Love from India 💗💗
@jaimemontesdeoca7989
Жыл бұрын
As always, a very helpful video. Thank you Kyle!
@chips-n-salsa
3 жыл бұрын
thank you for making this....just starting on algos so this is super helpful!
@shisamo
4 жыл бұрын
finally found a good explanation of two sum. Thanks a lot
@vladimirmikulic7860
5 жыл бұрын
Please do more of this Algorithms type of videos. Great explanation BTW.
@WebDevSimplified
5 жыл бұрын
Thanks! Did the white board explanation help with your understanding or would you prefer more of just coding?
@vladimirmikulic7860
5 жыл бұрын
@@WebDevSimplified The whiteboard explanation was brilliant, I would love to see you explaining algorithm videos on a whiteboard. For me personally, it's easier to understand and it feels like a real interview :)
@WebDevSimplified
5 жыл бұрын
@@vladimirmikulic7860 thanks for the feedback. I was really hoping the white board would be beneficial, because that is the kind of content I find most useful. I'll make sure to keep the white board in future videos. Hopefully I can even upgrade to a whiteboard I dont have to hold.
@vladimirmikulic7860
5 жыл бұрын
@@WebDevSimplified No need to thank me, thank you! I really appreciate the effort that you put in these videos.
@loljakkon
Жыл бұрын
thanks man you explained this so well, I was able to find the solution after making my own long if statement nightmare and i couldnt understand that second solution when i was first looking at it, i didnt realize how they were saving into that object variable originally
@olivermelichercik9788
2 жыл бұрын
Really enjoying these!
@trangnusi13
3 жыл бұрын
Thank you! Please make more videos like this. You are really helpful!
@bhavikrathod7493
4 жыл бұрын
I have enjoyed and learnt a lot from your videos. keep going!
@thatsenam9183
2 жыл бұрын
I would love to see more videos like this one.
@BluePhoenixGames1
5 жыл бұрын
Great video! More videos about algorithms from you would be really appreciated
@WebDevSimplified
5 жыл бұрын
Will do!
@mr.webdev3700
5 жыл бұрын
That was a great explanation! Good job! 👍👍👍👍👍
@WebDevSimplified
5 жыл бұрын
Thanks! I'm glad you enjoyed it.
@abdulmayeedchowdhury1397
4 жыл бұрын
Loved the way you described it. Thanks.
@qwertykeypad789
5 жыл бұрын
Love it bro, you did a great job. I learned this way of solving problems using hashing in C++ but after seeing in javascript its amazing. You explained it very well. Looking forward to see more videos like that 👍🏻
@WebDevSimplified
5 жыл бұрын
Thanks!
@elva329
Жыл бұрын
Enjoyed your videos very much. Could you please continue your algorithms series if possible? Thank you
@esportsnexus
4 жыл бұрын
Awesome! Please make some leetcode series of medium & hard problems!
@gabrieldiaz6509
3 жыл бұрын
The videos i always need
@SaifaldeenSAH
3 жыл бұрын
Thank you very much!, really enjoyed your explaining way, hoping to see more like that.
@algorithmtrader
2 жыл бұрын
the way you just popped up in the beginning always has me dead
@upmate2726
3 жыл бұрын
Nice one. Thank you for a comprehensive explanation
@chanduallada2417
3 жыл бұрын
I would like to see these kind of videos... it will be very useful for interview preparation Thanks for ur efforts 👌🏻👌🏻👌🏻
@oop_web7707
5 жыл бұрын
Thank you for the video. If you can, please do more algorithms.I'm new in JS and I really want to understanding this part. Thank you in advance
@WebDevSimplified
5 жыл бұрын
My video coming out tomorrow is another algorithm video.
@rtindevelops7580
10 ай бұрын
Hey love the entry !😂
@LawZist
5 жыл бұрын
Great stuff! Already waiting for you next video
@WebDevSimplified
5 жыл бұрын
I'm already planning out the next algorithm video I want to cover. It is really fun to solve the problems.
@lookhsu7705
2 ай бұрын
I like this! Thanks for sharing.
@betoduarte9207
3 жыл бұрын
Hello, awesome video! What would make this video even better though is if you walk through a number set and show how an example actually flows through the algorithm. Thanks for posting!
@anagh4802
3 жыл бұрын
This was really helpful! Thanks a lot. Also more of these please.
@thattoofunny
5 жыл бұрын
Great video. More algorithms please......
@WebDevSimplified
5 жыл бұрын
Thanks! I can't wait to make the next video.
@at4371
3 жыл бұрын
Thank you. Yours is excellent , but I come up with this too. step 1. get the difference (target - a[i]) step 2. search that difference if it exists in the array list using indexOf(diff) pitfall , indexOf could find same index , so we should not consider it. (n != i) var twoSum = function(a, p) { var n=-1; for( var i = 0; i < a.length; i++) { var dif = p - a[i]; n = a.indexOf(dif); if(n != -1 && n != i) { // to return [i , n] } } };
@savannahlin8063
5 жыл бұрын
Yes!Yes! I enjoy it. It's so helpful and useful.
@WebDevSimplified
5 жыл бұрын
Thank you! I am really glad I could help.
@extremespartan117
5 жыл бұрын
Muy bueno! I suppose you could add visuals to give a even more clearer explanation but otherwise this was really good!
@WebDevSimplified
5 жыл бұрын
Gracias. What kind of visuals would you like to see for a video like this?
@stith_pragya
8 ай бұрын
Thank You So Much for this wonderful video............🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@PATRICKCHUAD
2 жыл бұрын
very fast algorithm. Thanks for sharing. is the complexity of this algorithm equal to O(n) since there is only 1 loop ? O(n) is linear ?
@zafarsultanov1124
2 жыл бұрын
I love algorithms pls restart this course again
@ajwaters5323
5 жыл бұрын
These are great! Definitely more of these!
@WebDevSimplified
5 жыл бұрын
I'm working on the next one right now. I'm hoping to have it out in the next week.
@Habitual-Developer
11 ай бұрын
Yes, Algorithm series should be good..
@markemerson98
2 жыл бұрын
awesome: more leetcodes please buddy
@cesargabrielmuozcedeo3046
2 жыл бұрын
It has helped a lot. Thanks!
@jakeschwartz4641
3 жыл бұрын
Thank you for the awesome videos!
@thatsenam9183
2 жыл бұрын
Best video ever
@brianwebdev1958
3 жыл бұрын
Thanks, that was very helpful
@shirintooylar
2 жыл бұрын
This is great, thanks!
@VedantKulkarni619
4 жыл бұрын
Really awesome explanation and solution. Do you have a playlist?
@dilshodturabov
2 жыл бұрын
i love you every video lesson
@ShanilPanara
3 жыл бұрын
This was great! Thanks!!
@bikramchettri9405
5 жыл бұрын
Thanks for the detailed and simple explanation.
@WebDevSimplified
5 жыл бұрын
You're welcome!
@bikramchettri9405
5 жыл бұрын
@@WebDevSimplified Hey can you do a video on oop in javascript.
@WebDevSimplified
5 жыл бұрын
@@bikramchettri9405 I will add it to my list.
@bikramchettri9405
5 жыл бұрын
@@WebDevSimplified I love your explanation man, that's the only reason i am giving you a lot of trouble. Accept my apology.
@WebDevSimplified
5 жыл бұрын
@@bikramchettri9405 this is no trouble at all. I enjoy getting feedback and suggestions from viewers. I just have so many video ideas I need to use a list to keep track of them all or I forget the ideas too easily.
@tdpencil2811
3 жыл бұрын
You can try going through every value and putting the target - the value in a hashmap, then you can constantly lookup the value to see if it's there. That is O(n) time. (not to mention freakishly fast).
@flythetbm9909
5 жыл бұрын
These are great. More please!
@VillageJoker
3 жыл бұрын
Thanks for this dude !!!
@caiquevallim2209
Жыл бұрын
Which book would u recomend sir? :) I'm senior dev and now I'm going to focus on learning fatests solutions to solve problems and in order to improve my skills
@vishaltaywade8069
5 жыл бұрын
Really appreciate your test cases video 👍🙏 Cheers now I can able to understand js algorithms!!! Thank you so much! please do some more videos on and complications test
@WebDevSimplified
5 жыл бұрын
Thank you. I have another algorithm video coming out in a couple weeks!
@CH-tw7wb
3 жыл бұрын
I'm always stuck with brute force methods, I just can't come up with a clever algorithm even for the easy ones. When you first started solving coding challenges, were you able to easily figure out efficient algorithms or were you also stuck with only brute force methods? If so, how did you change that?
@djbilly5913
2 жыл бұрын
I fully feel the same...Just got to keep working
@bones1343
Жыл бұрын
I’ve struggled with the same thing until I learned about the different problem solving patterns. They’re good tools that help you optimize your solution. In this example Kyle uses a frequency counter. I’d suggest starting with easy problems using a pattern and gradually start solving more difficult ones until you really understand how it works. Hope this helps!
@IswearIwasBatman
3 жыл бұрын
Dont you have to push values from nums array into the prevValue array? How else would the prevValue array store previous values of Nums array?
@rojehhabib648
2 жыл бұрын
It is actually an object and when you do prevValue[value] = x you are basically assigning a key and a value to it
@pswr2009
3 жыл бұрын
Super helpful!
@AnnieTaylorChen
5 жыл бұрын
I like it you're trying different ways of presentation. Algorithm is definitely one of my weakest points, so I would love to see of those too! :) As a beginner I don't seem to come up with the faster solution naturally, even you explained and I read your code, it took me a while to understand it. Can you add more animation to explain more visually? Such as we can visually see the index numbers flying into the object previousValues as the code runs? So what's the best way to think "smarter"? Should I watch more similar videos?
@WebDevSimplified
5 жыл бұрын
I thought about adding some basic animation to this video, but ultimately was limited on time. I think I might try doing something like that for the next video though as long as it is applicable. As for getting better at algorithms the two best things you can do are practice a lot and read/watch explanations of the solution. I would try to solve a problem and then when you feel confident about your solution check an explanation of the solution.
@Spades340
5 жыл бұрын
This was a good vid. I haven't been doing so well in coding challenges for job interviews. Do you recommend anything else for me to get better in addition to grinding Leetcode problems?
@WebDevSimplified
5 жыл бұрын
Make sure to really read the solution and fully understand the parts that you get stuck on. This will help your problem solving skills immensely and will make it so that even if you cannot solve the problem you can hopefully explain a good enough approach to solving the problem that it won't matter. Also if you struggle with algorithms like I do then focus on making projects that are really good and the employer will care less about your algorithm skills if they can see you have already created real projects.
@Jason-mx8dl
3 жыл бұрын
Wait, where did the ‘index’ variable come from on line 13 when you return [index2, index]?
@pareenjapuneet
3 жыл бұрын
He fixed it at 5:54 to i.
@eggwarrior5630
2 жыл бұрын
Hi y'all sorry for troubling you all but the way i understand this is by following the code solution provided For Example: const array = [0,1,2,3,4,5]; const target = 9; From the first loop: currentNum = 0; neededValue = 9 - 0 ; index2 = [9] since it is undefined and null as well then it stored the i as the previousValues[neededValues] i dont understand the ELSE part of the code. Thanks in advance for the help much appreciated
@MontyKsycki
4 жыл бұрын
THANK YOU VERY MUCH!!!! VERY MUCH APPRECIATED!!!! THANKS FOR SHARING!!! HAVE A GREAT DAY!!! :)
@vladimirjean
5 жыл бұрын
That was very helpful, can you make more videos like that, I'd really appreciate it. Thanks!
@WebDevSimplified
5 жыл бұрын
I'm really glad I could help. I definitely plan to continue this series. I have already started on the next video.
@sjsjdjyktjt2457
5 жыл бұрын
Good stuff man! Just wondering, why did you set the variable "previousValues" as an object? Wouldn't initializing it as an array work the same way? Or is there a fundamental difference? Thanks!
@WebDevSimplified
5 жыл бұрын
If you use an array instead of an object then whatever the neededValue is that you are storing as the key of the object for example 1000 would be the index of the array. This would mean you would need to have an array that takes up at least 1000 spots in memory. Usually when you are working with large numbers like this or when you will potentially have many empty locations in the array then an object is better suited.
@joematkin2554
3 жыл бұрын
Hi thanks for the video, please can you explain why you didn't set the target to 9
@maxpapirovnyk4304
2 жыл бұрын
Great! Thanks!
@JustThink2000
3 жыл бұрын
I like how you explain
@juliorodriguez612
2 жыл бұрын
that popin at the beginning lol
@hackedaccount6782
2 жыл бұрын
really enjoy
@pinpon163
2 жыл бұрын
For better space complexity, could we also check if the current value is not already >= to the target before hashing it?
@rovsenhuseynov8368
4 жыл бұрын
Thank you for the useful video.
@samueltorres2485
2 жыл бұрын
Please do more leetcode stuff with detailed explanations!
@EntEduRealm
2 жыл бұрын
kzitem.info/news/bejne/tKKOr6F7bmpngI4 watch this for all solution
@serispeaks
Жыл бұрын
I appreciated this
@FIELDNAPHAT
3 жыл бұрын
Thank you so much for the vid.
@infyro
2 жыл бұрын
Great explanation! Although i'm still a bit confused about something in the algorithm if someone doesn't mind explaining it to me: I'm still a bit unclear as to how 'i' is getting returned on line 13 if index2 != null is true. Can someone explain how the corresponding index is automatically returned after the conditional?
@nestroyertv
2 жыл бұрын
So as you now , you can access object properties via its key. Whats happening here is he is creating an entry in the "dictionary"(normally referred as hashmap) where its KEY=NUMBER and its VALUE=INDEX. When he substracts the current number value to the target value the result is the KEY that he needs to look for in the "dictionary", if the dictionary contains an entry for that KEY we retrieve the value , which in this case is the index, meaning we already have our combination of indexes. If not he stores the index and value as an entry to the dictionary, that way he can look it up later. Hope this helps!
@stardriver8660
4 жыл бұрын
Hi Kyle could you go over questions on leetcode just like this one, it just helped me so much. So many answers on leetcode is not that reliable and hard to understand. Please consider, thank you!
@singamsettyrupeshkumar8746
4 жыл бұрын
How target - current number will work I don't get tht can you explain once !
@justaregulargamer7314
2 жыл бұрын
im gonna need a video explaining that hash value part pls
@shritishaw7510
2 жыл бұрын
take it or leave it: to get your resume sorted: build some real-world projects or internships and put them in your resume. to pass the interview: DATA STRUCTURES AND ALGORITHMS hands down. to excel in your job: continuous eagerness to learn something new. btw all the above are just technical stuff... but they are also the most important factor, isn't it.
@baiai6509
4 жыл бұрын
thank you, clear and understandable but can we solve it with a hashmap?
Пікірлер: 221