Тёмный

Python for Coding Interviews - Everything you need to Know 

NeetCode
Подписаться 738 тыс.
Просмотров 392 тыс.
50% 1

🚀 neetcode.io/ - A better way to prepare for Coding Interviews
Checkout my second Channel: @NeetCodeIO
🥷 Discord: / discord
🐦 Twitter: / neetcode1
🐮 Support the channel: / neetcode
⭐ BLIND-75 PLAYLIST: • Two Sum - Leetcode 1 -...
💡 DYNAMIC PROGRAMMING PLAYLIST: • House Robber - Leetco...
0:00 - Intro
1:13 - variables
2:40 - if statements
4:00 - loops
6:06 - math
8:40 - arrays
12:38 - sorting
13:40 - list comprehension
14:20 - 2d arrays
15:25 - strings
16:50 - queues
17:30 - hash sets
18:25 - hash maps
20:15 - tuples
20:55 - heaps
22:30 - functions
22:55 - nested functions
24:20 - classes
#coding #interview #python

Наука

Опубликовано:

 

24 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 264   
@NeetCode
@NeetCode Год назад
🚀 All of the code is available at: neetcode.io/courses/lessons/python-for-coding-interviews Timestamps: 1:13 - variables 2:40 - if-statements 4:00 - loops 6:06 - math 8:40 - arrays 12:38 - sorting 13:40 - list comprehension 14:20 - 2-d arrays 15:25 - strings 16:50 - queues 17:30 - hash sets 18:25 - hash maps 20:15 - tuples 20:55 - heaps 22:30 - functions 22:55 - nested functions 24:20 - classes
@myonlylovejesus887
@myonlylovejesus887 Год назад
What is the theme you are using brother?
@masternobody1896
@masternobody1896 Год назад
thanks
@andrewaranas8853
@andrewaranas8853 Год назад
@NeetCode graph theory course pls.
@jeevaalok1467
@jeevaalok1467 Год назад
@NeetCode i need a suggestion from you , i know python & c++ very well . so which one i should choose for interview purpose ? i mean which one is better ? please reply it really helps a lot
@marioamatucci
@marioamatucci Год назад
for queue I'd have mentioned something like ``` from collections import deque q = deque([1,2,3],maxlen=3) print(q) q.append(-1) print(q) q.appendleft(-2) print(q) ``` better than random op like here that does not show the queue essence :)
@perezident14
@perezident14 Год назад
This video came out less than 12 hours after I failed to pass a coding assessment question that I did using Python. I never wrote Python code, but JS wasn’t an option for the assessment. I somehow managed to make it to the next step of the interview and I am not taking this video for granted. Thank you so much! 🎉
@rj5697
@rj5697 11 месяцев назад
I started to learn Python before I did a web-dev bootcamp that was just JS. I have an interview assessment where JS isn’t available and I have to use Python, and making the switch back has been…difficult lol. So I’m with you as far as not taking this video for granted lol.
@user-qn5yf8bc1c
@user-qn5yf8bc1c 4 месяца назад
Bro how's that even possible ? What kindof questions they asked? Would be helpful to know
@NphiniT
@NphiniT 25 дней назад
I have interview in 15 minutes 😬
@SaiManasaPappu
@SaiManasaPappu 7 месяцев назад
This video is everything I've learned about Python in the last 3 months and more! Thanks for such on-point crisp content, and for putting it all in one single video unlike other RU-vidrs who make multiple never-ending clips with repetitive content
@anujrana1509
@anujrana1509 Год назад
This is probably the best tutorial for someone who knows another programming language and wants to learn python. Thank you for the tutorial :)
@sabaamanollahi5901
@sabaamanollahi5901 Год назад
Thanks NeetCode! can't wait for your system design videos :)
@macolulu
@macolulu Год назад
You are a true genius. The way you display the output is so easy to see. The comments on the code are so visual. By watching your videos I started to like practicing interview questions and algorithms in general and feel sorry that I was not learning algorithms in school in the clear way that you demonstrate to us. All in all, I am grateful that I found your channel.
@535emon
@535emon Год назад
This is where I can get everything I need for coding part of my interview. Thanks Neetcode. You have given us enought
@midhunkrishnan5988
@midhunkrishnan5988 Год назад
I started learning DSA with Python today and I wanted a Python refresher. as I had lost touch with it. Luckily, I came across this video and I can't believe this 26 min covered all topics. Thank you so much!
@peterwanjihia2372
@peterwanjihia2372 8 месяцев назад
how is it going ??
@SamyuktaNeeraj
@SamyuktaNeeraj 9 месяцев назад
This is such a brilliantly constructed video! Thank you so much. Could not have learned all this python I need for interviews without your help!
@nathanyao3525
@nathanyao3525 Год назад
this was exactly what i was looking for, thank you! Perfect timing
@Lewis64
@Lewis64 Год назад
This is the best cheatsheet for python syntax ever. Got a coding interview tomorrow, thank god you posted. ❤
@vladimirkim411
@vladimirkim411 Год назад
Thank you so much! Loved how concise and clear your examples are!
@terrypark3690
@terrypark3690 Год назад
Great video I've been trying to get around to learning python and this is a great brief on what's different from other coding languages saved me so much time.
@dustinhxc
@dustinhxc Год назад
Wonderfully typed! Love the comments in the code! Thank you for this video!
@AustinCS
@AustinCS Год назад
Not sure if it was mentioned or not, but for problems like path sum II it can be useful to understand deep copy vs shallow copy.
@jaimelu2840
@jaimelu2840 10 месяцев назад
This is a great concise yet informative summary! Thank you!
@adamrizk6735
@adamrizk6735 Год назад
Great video as usual, loved how concise and straight to the point it is. You've convinced me to switch from Java to Python for interviews and programming puzzles 😁
@JaredT
@JaredT 2 месяца назад
This video gives me life. If this video would ever cease to exist, I’d cry.
@bombrman1994
@bombrman1994 9 месяцев назад
this was so good, I was like 50% confident with my python collection skills and now I am alot more confident. I can simply google what I know that exists even if i forgot the syntax. This is what I truly need content that can show me that something exists to know what to search. We don't know what we don't know
@picnicbros
@picnicbros Год назад
Used to solve most LeetCode problems using Java but thanks to you I picked up Python and agreed that it's much easier to use for interview problems where ideas are more important. This video is really helpful for me to perfect my Python skills
@Yoooyoooo286
@Yoooyoooo286 3 месяца назад
Heyy as indian can i solve dsa in python n gove job intevriew with python
@entertainmentadda1183
@entertainmentadda1183 Год назад
This video cleared alot of my small problems in for loops and lambda function. Good work brother.
@camilailges36
@camilailges36 11 месяцев назад
BEST video of all!! I'm also deep learning python for code interviews and this has made my life so much easier!!! Thanks so much. Your videos are the bests!
@Hamun002
@Hamun002 2 месяца назад
Thank you for providing this, need to get back in the saddle and things like this really help
@Fahim_Ahmed22b
@Fahim_Ahmed22b Год назад
This is super useful!!!! Thank you so much NeetCode!!!
@ankit28goyal
@ankit28goyal Месяц назад
This is just amazing! I always look to refresh my python syntaxes after I stop coding in this language and waste time again and again. This video is so crisp and to the point.
@harumambaru
@harumambaru Год назад
Thanks, I am using python at work for more than 6 years and heaps and nested functions was new and very useful info for me. 1:23 Short addition to printing that can save you time if you do a lot of prints print(f'{n=}') is the same as print('n = ',n)
@ephremtadesse3195
@ephremtadesse3195 16 дней назад
I found this tutorial to be the most precise yet packed with fascinating details! For kicks, I totally get all the Java lingo!
@shelbypereira
@shelbypereira 8 месяцев назад
small note: it may be mentioned in the video but really the points on "arrays" are really discussing "lists". Arrays are distinct in python and available as part of the numpy package but generally only used for situations where memory is a consideration. Also true numpy arrays cannot be resized. For a nit picking interviewer this may be important. Video is excellent , great way to cram for an interview!
@piyusharyaprakash4365
@piyusharyaprakash4365 Год назад
you convinced me to change from javascript to python for coding interviews
@dhanuufcdk
@dhanuufcdk Год назад
Great video. Good for refreshing python concepts
@seshubeshu5959
@seshubeshu5959 Год назад
@NeetCode I really appreciate the quick refresher on python. I used it back in grad school and never touched it again. Would it be possible to break down every topic into an individual video that can be maintained as a playlist ? I may not be the sharpest tool in the box, however, it feels like certain sections of the current video are little fast.
@asylzhantatibayev1538
@asylzhantatibayev1538 Год назад
I think the world rests on people like you. Thank you so much!!
@NeetCode
@NeetCode Год назад
Np 🙂
@rajkumarv.b565
@rajkumarv.b565 Год назад
Thanks. Thanks a lot for this. I exactly looking for whether I can use python at big tech companies. You're really awesome.
@streambai1045
@streambai1045 5 месяцев назад
I started to learn Python about two months ago, and this is the best training video for Python.
@InfiniteNesLives
@InfiniteNesLives 10 месяцев назад
Thanks for the great and concise video! One suggestion I would have is to leave some of the printouts from the examples on the screen for longer so we have time to inspect and easily pause if need be. Some of the results are on the screen for so briefly before switching to new subject that have to be ready and quick with the pause button to press. Pressing run earlier would have helped greatly while you talked instead of talking about the expected result and leaving us in unnecessary anticipation.
@diale13
@diale13 8 месяцев назад
The best tutorial for someone who knows another programming language and wants to learn python
@goodwish1543
@goodwish1543 Год назад
Excellent! Hope to see more on System Design. ^_^
@1243576891
@1243576891 Год назад
Very helpful. Thanks for the organization!
@akrammohamed8374
@akrammohamed8374 6 месяцев назад
The best video you've ever made is this one
@meetgandhi4176
@meetgandhi4176 3 месяца назад
At 7:09, The answer which is round off to -1 is definitely correct as -1.5 has been round to a bigger value to -1. It shows the value greater than or equal to 0.5 can be rounded off to correct value to its next greater integer value (1.5 can be rounded off to greater value 2 in positive no., and (-1.5) will be rounded off to greater value (-1) in negative no.) Yep, the explanation for it is awesome. Sometimes, its bit tricky for someone to find the particular negative value and might stuck over it. Thanks.!
@m04d10y1996
@m04d10y1996 Год назад
Thanks a lot for this video. Please make a video on how you learnt Java development and what resources you referred to and what was your strategy to learn and work in it.
@silent7152
@silent7152 Год назад
exaaclty what i needed ... thanks man
@Kakashi75
@Kakashi75 Год назад
The most recent version of python released updated syntax allowing the use of increment ++ and decrement -
@sharadrao4893
@sharadrao4893 Год назад
WOW 🥺 I love you ❤️ I am new to programming now I am programmer. Thanks
@onomatopeia891
@onomatopeia891 Год назад
Thanks for the very informative video!
@violetjellyfish2089
@violetjellyfish2089 Месяц назад
Отличное видео, большое спасибо! Очень удобно, что все чётко и посуществу, без длительных пауз и рассусоливаний
@__sarik
@__sarik Год назад
Please also make a video regarding bisect function of py, it is also very useful. And also I have a question regarding heapq, what we should do if we want to have customized sorting?
@congwang171
@congwang171 10 месяцев назад
Thank you so much. This video helps me a lot.
@luisroxjimenez
@luisroxjimenez Год назад
This video helped a lot, thank you.
@aussietramp
@aussietramp Год назад
New fan here. I gonna watch every single video and thumb up any of them!
@NeetCode
@NeetCode Год назад
Thank you 🙏
@pinguincoder
@pinguincoder Год назад
Im Not preparing for coding Interviews as im already a Software Developer in Germany. But I wan't to increase my ability To solve algorithm based Problems and my Problem solving skills in general and your Videos are absolute Gold! I'll definately will take a look into Python as im currently only working with c# which ist Kind of noisy for those Problems.
@yuurishibuya4797
@yuurishibuya4797 Год назад
16:20 Ord() for ascii value! Nice intuitive function name, easy to remember. /s
@alexandretrajano8927
@alexandretrajano8927 3 месяца назад
Thanks man, you helped me a lot! Damn useful!
@user-qo5pf6zz5z
@user-qo5pf6zz5z 4 месяца назад
Hi friend, love your channel, thank you so much for your efforts! I do have one suggestion, since you're teaching people to interview with Python, it might be helpful to follow PEP8 standards. Only interviewers with a background in Python will notice, however for experienced Python devs, not following the accepted style guidelines screams n00b which isn't ideal for interviewees trying to make a good impression. I know its a tiny detail which doesn't matter that much in the grand scheme because your channel is awesome and super helpful, however having more "Pythonic" style will definitely help junior devs put their best foot forward with more experienced Python folks.
@PyckledNyk
@PyckledNyk 2 месяца назад
Python is also a good intro to more complex languages since it uses a lot of coding conventions that can be found in other popular languages
@mnchester
@mnchester Год назад
Great video! Still seems unreal that there's no native way to support a max-heap without that awkward workaround. I was expecting better from Python :)
@9d6witch
@9d6witch 4 месяца назад
I needed this. Ive been coding but as a game dev, and my mentor who want me to enter software development say i have to learn the Logic of Python. Thanks for this...even though im still making games on the side 😂😂
@zachary_burrows
@zachary_burrows Год назад
You rock dude, thank you
@marinablue9903
@marinablue9903 Год назад
Hi NeetCode, I'm wondering why your video about your internship experience at Capital One is not available now? That video was very interesting and wanted to see again since I got an offer from Capital One for TIP! Hope I can see that video again :)
@SaravananD
@SaravananD День назад
Brilliant as usual 🙂
@anselmobd
@anselmobd 8 месяцев назад
Great video! But, regarding the code shown at 6:30 of the video, I must clarify that the correct mathematical result of "-3 // 2" is "-2". This is because in the representation “Dividend = (divisor x quotient) + remainder”, the remainder must be non-negative. This is a widely accepted mathematical convention, and is useful in many applications. Thus, with the values in the example, the representation would be "-3 = (2 * -2) + 1". That said, be careful with "most languages" which are not consistent with mathematics. : )) Seriously, this may cause some error when coding some mathematical solution.
@miaowcat1
@miaowcat1 Год назад
I have been following along neetcode 150, and got a great offer, thanks!
@YusserAlQazwini
@YusserAlQazwini 10 месяцев назад
Great video, thank you.
@Migsfigs
@Migsfigs 8 месяцев назад
Great video. Did you touch on linked lists? I might've missed it.
@md-ayaz
@md-ayaz Год назад
All good. I use python at work. When it comes to Object oriented design interviews Java/C++ works the best. Python falls short there.
@sigfigronath
@sigfigronath Год назад
Coming from Java this syntax is so bizarre to me ahaha, great video btw !
@mukeshnayal624
@mukeshnayal624 10 месяцев назад
nice content ! will you make it for advance questions.
@sarthakgupta290
@sarthakgupta290 Год назад
For guys like me who are switching from Java to Python for LeetCoding, this is really helpful!
@harshivam
@harshivam Год назад
why you're shifting?
@sarthakgupta290
@sarthakgupta290 Год назад
@@harshivam Python syntax is much shorter and easier to write. I am NEVER EVER going back to Java for coding interviews
@hritikroshanmishra3630
@hritikroshanmishra3630 3 месяца назад
@@sarthakgupta290 is it good go in coding interview with python??????
@sarthakgupta290
@sarthakgupta290 3 месяца назад
@@hritikroshanmishra3630 Absolutely
@matheuscosta5330
@matheuscosta5330 2 месяца назад
Amazing content!
@tomundisclosed2343
@tomundisclosed2343 Год назад
for the nonlocal val, the function doubles val locally still, as when i print val by itself afterwards I don't get it doubled
@Senick
@Senick 4 месяца назад
Excellent video 👍
@vasujain1970
@vasujain1970 Год назад
Wow, you're on fire!!
@esteban-alvino
@esteban-alvino 8 месяцев назад
Thanks sir a lot of topics to Train kudos
@practicefirsttheorylater
@practicefirsttheorylater Год назад
perfect video for a longtime java user like me
@neelakshisoni6118
@neelakshisoni6118 Год назад
Hey..Thanks for the video...Can u plz make a video on what to put in a resume for carcking Google interview
@Sgoose105
@Sgoose105 Год назад
it'd better call [1, 2, 3] as list, as oppposed to an array. I think array refers to numpy array
@brunomonteiro3646
@brunomonteiro3646 2 месяца назад
This channel is amazing
@krishnadass4365
@krishnadass4365 Год назад
Neetcode, I'm tripped on the 2-D list thing a bit. Especially this [[0]*4] * 4 -> why does changing one value, affect all values?
@Mizaq
@Mizaq Месяц назад
7:13 int isnt really "rounding" the value. For -0,7 you would still get 0 if you make int() around it, yet the round should be -1 since its closer. Therefore int() is just deleting the values right after the dot, that in this case will be same as using math.ceil() for negative values.
@soumalyadas1123
@soumalyadas1123 4 месяца назад
6:30 - that's why, we can better say it as *floor division* 7:48 - can also be done with abs(), just in case, importing math isn't possible
@ZhenglinLi
@ZhenglinLi 8 месяцев назад
From Java to Python here! Love the concise of Python and hate we must complete 2 DSA problems in 45 min interviews.
@andiuptown1711
@andiuptown1711 5 месяцев назад
Why hate?
@nischit727
@nischit727 4 месяца назад
​@@andiuptown1711 probably because due to the time restriction
@hlubradio2318
@hlubradio2318 2 месяца назад
Nice what a comeback
@cardorichard4148
@cardorichard4148 9 месяцев назад
It'd be great if you did this for JS ❤
@DodoLP
@DodoLP Год назад
the modulo and minus modulo is because of how its mathematically written
@venkateshmaliga659
@venkateshmaliga659 2 месяца назад
Python doesn't have tree set /ordered set, Tree map /ordered map which are using self-BST so what are alternative to it in python to use those ? Sorted containers are not built in with python So That's leaves to bisect module ,but it uses binary search not red black trees so What do u think?
@moulidharanshanmugam3031
@moulidharanshanmugam3031 Месяц назад
at 15:16 it is said that the values would change for all the sublist when created by the format [[0]*n]*n. If the reason is that it creates the same value, then why does the other values change when I do the same with [0]*n
@patrickateng4348
@patrickateng4348 Год назад
So, What exacly would I need to be a front end engineer? I'm sort of confused! I've done HTML and CSS and currently doing javascript. Should I drop Javascript and start python? If not, how far should I learn Javascript to be considered 'okay' by an interviewer to be able to use python in coding interviews?
@AdityaGowda2000
@AdityaGowda2000 Год назад
is there any module for balanced binary tree in Python like std::set in C++. Because some algorithms like Dijkstra's work better with balanced binary tree than hash map.
@KannanMavila
@KannanMavila Год назад
Really good list. Love how concise it is. You missed something important though: taking input from file and from console
@sefasarac2839
@sefasarac2839 6 месяцев назад
Hello I want to ask a question. Is it necessary to use array modules (like numpy,array) in python or can we solve it with lists ? Because in reality there are some differences with real arrays and lists. But do they care about in DS & Algorithm interview ? As I understand from your video they dont.
@CertifiedDeadMemes
@CertifiedDeadMemes 6 месяцев назад
Doing an interview for a role that will primarily use python tomorrow, if I get the job, I'll subscribe to NeetCode's only fans
@NeetCode
@NeetCode 6 месяцев назад
Good luck, you got this!!!
@andiuptown1711
@andiuptown1711 5 месяцев назад
Update
@CertifiedDeadMemes
@CertifiedDeadMemes 5 месяцев назад
they took forever to get back to me buy\t, yes I'm starting on Monday! @@andiuptown1711
@NG-bd6di
@NG-bd6di Год назад
Regarding the 2d arrays tip @15:16: Could you provide an example of how the "wrong" method would become an issue? I understand that it's basically 4 "clone" rows of zeros, rather than unique rows. But messing around with both methods, I can't get figure out when this difference would become a problem. Thanks!
@NeetCode
@NeetCode Год назад
If you were using it to store information, if you update one row it will update all of the rows in the same position. This would be troublesome for DP problems or graph problems.
@user-qt1uj2hr9v
@user-qt1uj2hr9v 5 месяцев назад
you can use .copy() tho
@ding8880
@ding8880 Год назад
Yo just want to let you know that I can't afford the paid version now. But someday in the future when I have a better job imma buy a few and gift others as a token of appreciation.
@KrishnaDasPC
@KrishnaDasPC Месяц назад
12:33 Shortest way to reverse x = [1, 2, 3, 4] print(x[::-1]) will print [4, 3, 2, 1]
@studywithjames
@studywithjames Месяц назад
Can someone help me with 15:12 from my understanding, using "x = [0] * 3" creates [0, 0, 0], but all 0's are same object but its okay since we usually do "x[0] = 1", creating a NEW object. It is now [1, 0, 0]. But still, 0's are same object so, use the "=" sign to make NEW object. Now 2D array makes it harder. x = [[0] * 2] * 2 x[0][0] = 1 We could think that since using "=", it will only update [0][0]. But no. We are using "*" TWICE. (x = [[0] * 2] * 2). X is an object inside of an object. meaning, it will give [[1,0],[1,0]] To make a NEW object, we change the highest object. In this case, x[0] = [1, 0] thats why it sucks to use (x = [[0] * 2] * 2) in 2D array. You need to make a brand new one from scratch like x[0] = [1, 0].
@ahmedtremo
@ahmedtremo 2 месяца назад
so good thanks
@akashdatta2002
@akashdatta2002 Год назад
I actually tried to learn python. But my course teachers are teaching us java for oop. So whenever i have both eclipse(cz i can't create jar files on vs code) and intellij ide for python installed in my laptp along with a cdeblocks, my computer hangs like a maniac. Even an ssd can't handle it.
@boltonkim7090
@boltonkim7090 Год назад
There are quite a few problems that can use sorted trees that guarantee log(n) for basic operations (add, remove and contains). It seems Python does not have anything built-in? I'd love to switch from Java to Python but this limitation is kind of a deal breaker. I know sortedcontainers and blist exist but they aren't available on most interview platforms. How do you deal with this?
@slh4176
@slh4176 Год назад
Same here
@botousai
@botousai Год назад
Make up a method and tell your interviewer "I know this structure doesn't exist in python, but I am going to pretend that we have it here". They don't care about your white board being perfect python code. They care about if you can solve the problem, how you think/communicate, etc.
@phaddu7737
@phaddu7737 4 месяца назад
Hey, can you point to any sources to learn DSA in Python as all I can find are the ones in Java, C++
@ivan6990
@ivan6990 2 месяца назад
thanks my dude
Далее
Big-O Notation - For Coding Interviews
20:38
Просмотров 415 тыс.
🥔 Sloppy Joe Potato Casserole ~#Shorts
00:23
Просмотров 2,8 млн
ОНО СУЩЕСТВУЕТ?? #shorts
00:19
Просмотров 876 тыс.
10 Python Comprehensions You SHOULD Be Using
21:35
Просмотров 119 тыс.
I quit Amazon after two months
10:09
Просмотров 572 тыс.
Software Engineering Job Interview - Full Mock Interview
1:14:29
Top 7 Data Structures for Interviews Explained SIMPLY
13:02
5 Good Python Habits
17:35
Просмотров 390 тыс.
Top 8 Data Structures for Coding Interviews
14:00
Просмотров 147 тыс.
25 nooby Python habits you need to ditch
9:12
Просмотров 1,7 млн
How to NOT Fail a Technical Interview
8:26
Просмотров 1,3 млн
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1,1 млн
Python lists, sets, and tuples explained 🍍
15:06
Просмотров 234 тыс.
Все розовые iPhone 💕
0:51
Просмотров 206 тыс.