LeetCode #1: Two Sum | Coding Interview Solution

preview_player
Показать описание
A step-by-step solution to #LeetCode Question 1: Two Sum

0:00 Intro
0:32 Brute force: O(n²)
1:39 Optimized: O(n)
2:19 Code walkthrough
5:35 O(n²) explanation

#coding #programming #algorithms
Рекомендации по теме
Комментарии
Автор

Extremely clear and well presented video. Here's a comment for the Youtube algorithm.

lazarus
Автор

Thank you for sharing your knowledge and expertise with the world!

mhdez
Автор

You save me man, thank you. Now a can learn python and english with that subtitles.

AndersonGomes-nfvh
Автор

Omg I needed this. YOU'RE AWESOME

erin
Автор

Keep up bro! Your vids are extremly useful !

deyanlafchiev
Автор

incredible hard to be the first question!!!! I will try to study this a lot more, i will do a brute force in my mind in order to get what you did here!

polettiayala
Автор

You did an incredible job. Great explanation and pace!

adammarley
Автор

Great explanation. I'm trying to imagine what that syntax would look like in Java.

Imagine_Baggins
Автор

Thank you for sharing your knowledge. You helped me a lot!

ego_mejia
Автор

Thanks bro for sharing your knowledge and for explaining clearly

Nonsync
Автор

Great explanation and visualization, thank you

lethnisoff
Автор

Brute. This guy knows his Brute Forces

le-daniel
Автор

Ты великолепен! Куда отправить деньги чтобы поддержать твое творчество?🤗

БабекАскеров-пй
Автор

ajig aing can ngarti, masih smp, rek ka smk jurusan rpl, bakal diajar anu kieu moal nya, siap siap heula we ah

bonjovi
Автор

But you are going to be copying memory here right? every single time you need to add a new value to the array, the array will be recreated in memory? Incase of the array being a lot larger than 3-6 int's the array will be changed multiple times which causes other issues right? is this really the greatest solution?

Rekanized
Автор

Hello, I have one question regards to linear time solution which is mentioned here, I understand when we are traversing through the list only once.. While we are checking if the element i.e Target- list elem in dictionary we are doing o(1) n times which again corresponds to O(N) so O(n) * O(n).. sorry i m wrong, request you to please correct me.

rohithgorthy
Автор

I see, so this is what I overlooked...

anonimowelwiatko
Автор

My brain just died i have no knowledge of math since i didn't listen when i was in highschool, any tips to begin?

chris_ez
Автор

Try to always keep the original LC # in your title.

rydmerlin
Автор

which video editing software are you using to make this video?

happy_life