Mock Coding Interview Question: Two Sum [LeetCode]

preview_player
Показать описание
Follow along as I solve a programming question in Java exactly as you should do in a coding interview.

Solution 1 (O(N^2)):
Theory: 2:46
Code: 4:37

Solution 2 (O(N)):
Theory: 9:41
Code: 13:34

Helpful Books:
Рекомендации по теме
Комментарии
Автор

I know that your last video was 1 year ago but are you planning to do more videos? This video was very accurate

zerozeromc
Автор

Best video for explaining, The best part was when you explained what to return when you find that element. Thanks.

adityaverma
Автор

May I ask why did you stopped making these videos? I believe that your approach it's extremely helpful for anyone who prepares for technical interviews!

TheRoamingCorgi
Автор

Very good tutorial, hope you can upload more of them in the future.Maybe, if you can cover the case where the array is already sorted, it should have a logN solution, right?

hunmango
Автор

Can you give me a discord server link that helps us to meet mentor and talk to him in vc and sharing doubt and discuss problem solving.i hope you will help me.

justworkfine
Автор

Very thoroughly explained, Thanks miss

mehranseraj
Автор

That helps me a lot, I completely understand the solution. Thank you very much. Do you have more videos about the leetcode? I want to watch more.

kunli
Автор

will you be making more videos? these are the best videos on youtube!

drewpham
Автор

can you please do this in like JS or python. Leetcode already has Plenty of Java solutions

Shmack_
Автор

This was the best. I see there's a #2. I hope there's 100 more.

陈瀚龙
Автор

Could you please explain line 13: return new int[]{-1, -1}; ? Why do we return {-1, -1}? Thanks

steveleung
Автор

if j = i + 1 then how can you get 7 + 15 = 22??? 15 is 2 numbers ahead of 7 not 1

saladgaming
Автор

can u plzz explained that j=i+1 in second for loop

subodhjagtap
Автор

This logic doesn't work for repeated integer values.

mohammedsadiq
Автор

but you ignore the property of the given array: sorted

weihaishen
welcome to shbcf.ru