Solve This Coding Problem and Win $200

  Рет қаралды 2,451,332

Kenny Gunderman

Kenny Gunderman

2 жыл бұрын

Get in touch with me in my free software developer community: www.skool.com/software-develo...
📚 Free 0 to Full-Time Programmer in 5 Steps eBook: kgunderman.com/newsletter
@NickWhite and I hit the streets of Chicago to ask strangers If they know how to write code. If they do, and they're able to solve our programming challenges we will give them up to $200.
Subscribe to Nick's KZbin channel:
kzbin.info?sub...
Business Inquiries:
contact@kgunderman.com
Resources:
----------------------------------------------------------------------------
My Top Recommended Udemy Courses: bit.ly/3miUBbm
Skillshare: skl.sh/kennygunderman07211
Socials:
----------------------------------------------------------------------------
Subscribe: / kennygunderman
Instagram: / kennygunderman
Twitter: / kennygunderman

Пікірлер: 2 400
@godofpro5767
@godofpro5767 2 жыл бұрын
a real programmer won’t go outside
@RedStone576
@RedStone576 2 жыл бұрын
based
@Sp4wn_
@Sp4wn_ 2 жыл бұрын
based
@tedlopez1368
@tedlopez1368 2 жыл бұрын
based
@MrBruh-xc1qy
@MrBruh-xc1qy 2 жыл бұрын
based
@SolathPrime
@SolathPrime 2 жыл бұрын
I'll rune the joke Also your right
@secabrepheox5450
@secabrepheox5450 2 жыл бұрын
6:11 "It's never too early to start coding".. I've been telling my 3 year old kid that but she insists on learning how to read first... Kids these days..
@kingbrianmendes
@kingbrianmendes 2 жыл бұрын
hahaha
@punu3675
@punu3675 2 жыл бұрын
so lazy…
@justarandomguy1541
@justarandomguy1541 2 жыл бұрын
Lol
@notcrispeeweevile1388
@notcrispeeweevile1388 2 жыл бұрын
Yea like really they should stop being lazy. I had already graduated by the time I was 3.
@nardalis4832
@nardalis4832 2 жыл бұрын
You kinda need to read first in order to understand coding :P (and yes I know this is most likely a joke lel)
@Bayers2020
@Bayers2020 2 жыл бұрын
The guy at the end said “I think it’s an essential skill everyone should have.” I cannot agree more. I’ve discounted myself for years as dumb or not learned because I’ve never delved into things like this which have always put me in awe and today I realized, when time applied, I could actually do this if I wanted to, and how far progressed would we be technologically if everyone had this under their belt from a young age xD
@sudonim116
@sudonim116 2 жыл бұрын
Issue is not everyone enjoys it
@mtutoriales
@mtutoriales Жыл бұрын
So is math yet so many people hate it with passion regardless of their potential.
@TheAnimeist
@TheAnimeist Жыл бұрын
I feel the same way about boards. Everyone should at least skateboard, surf, Onewheel, etc. Progress toward peace and no hunger, imagine it xD
@angelsaucedo2231
@angelsaucedo2231 Жыл бұрын
bruh nothing is hard if you apply yourself. Its just memorizing things. Like advanced maths. Just some people dont care to learn
@uku4171
@uku4171 Жыл бұрын
@@mtutoriales I think it mostly depends on the teacher. It's also because of the reputation that maths has as "the hard subject".
@kaiacrisp
@kaiacrisp 2 жыл бұрын
Dude I watched this like 6 months ago and didn't know how they did any of this but after taking a CS class in Python I understand it now. Thats insane...
@momenmohamed8337
@momenmohamed8337 Жыл бұрын
in what U toke it
@IllIIIIIIllll
@IllIIIIIIllll Жыл бұрын
same here,that hits different
@kaiacrisp
@kaiacrisp Жыл бұрын
@@momenmohamed8337 in a intro to CS college class
@vanci2039
@vanci2039 Жыл бұрын
If a online class drop the link
@dv5625
@dv5625 Жыл бұрын
@@vanci2039 kzbin.info/www/bejne/gIGaeod_jayjfs0
@stxnw
@stxnw 2 жыл бұрын
i am starting to think im better than the average programmer after watching this. might be a sampling bias since better programmers dont leave the house.
@soruzein2988
@soruzein2988 2 жыл бұрын
they fear to the sun
@stxnw
@stxnw 2 жыл бұрын
just want everybody to know that i am all green on my github
@mohitsagar9492
@mohitsagar9492 2 жыл бұрын
lol I cringed hard when I saw the first girl using "+=" with a string in Python (since strings are immutable in Python, it basically creates a new string every time making the complexity O(N^2)).
@stxnw
@stxnw 2 жыл бұрын
@@mohitsagar9492 if im not wrong string concatenation are ammortized O(1) just like push_back() in C++ without reserve(). either way, it should be a non issue nowadays. there were more... pressing mistakes.. in the video.
@mohitsagar9492
@mohitsagar9492 2 жыл бұрын
@@stxnw Right in C++ strings are mutable! However in Python and Java they are immutable. Honestly everyone other than the first girl and that one Indian dude with Hashmaps didn't seem to be actual programmers so I didn't expect much from them anyway XD. And you will be surprised how much these small optimizations can matter when dealing with massive data!
@danielgeorgianni1687
@danielgeorgianni1687 2 жыл бұрын
"In java it doesnt work" Man rethought his existence in .5 second 🤣🤣
@ericjohn2352
@ericjohn2352 2 жыл бұрын
Hahaha "Why am I here, What purpose do I have"
@putramakatita8814
@putramakatita8814 2 жыл бұрын
Hey! 🤣
@dgh25
@dgh25 2 жыл бұрын
i did this in java in 5 mins
@Omar-kl3xp
@Omar-kl3xp 2 жыл бұрын
In Java it would be easy for me to do it however I don’t knw any other programming language yet
@iamgroot1328
@iamgroot1328 2 жыл бұрын
I know python the easiest one
@brownbearedurardo
@brownbearedurardo Жыл бұрын
I'm a 3rd-year Computer Engineering student and this video makes me wanna refresh my knowledge in programming (both C and C++). Love from the Philippines.
@emachine003
@emachine003 Жыл бұрын
The funny thing about 0:52 is that her solution of using reversed() is actually far more efficient than manually writing out a function to reverse the string since Python library functions are highly optimized.
@meelaud2103
@meelaud2103 Жыл бұрын
no shit XDDD thats y she couldnt use it
@apostate101
@apostate101 Жыл бұрын
You're right, Since Python is written in C, the library functions are super fast.
@bronzejourney5784
@bronzejourney5784 Жыл бұрын
@@meelaud2103 But thats not a right mindset to be a programmer with, especially in today's market. What looks like cheating to you is just another tuesday for us. It just works like that, as said "You dont need to reinvent the wheel everytime you need to go somewhere with your car".
@joaofernandes6419
@joaofernandes6419 Жыл бұрын
Recursivity always calling the function + char of the current position until the length of the string would work well too
@trashbox9511
@trashbox9511 Жыл бұрын
@@bronzejourney5784 She wasn't the one making up the rules. And honestly, there is a lot to be learned by trying to accomplish something in as many different ways as possible, rather than calling it good with the "easy" or "correct" way.
@clucl3
@clucl3 2 жыл бұрын
When grandpa comes out swinging like, "binary, assembly, matlab, basic, that's what I used to use when I was a kid"
@sodiboo
@sodiboo 2 жыл бұрын
cosmic rays
@justapugontheinternet
@justapugontheinternet 2 жыл бұрын
Cobol, fortran
@essaquadry
@essaquadry 2 жыл бұрын
Matlab is still used by Engineers
@markushandel5424
@markushandel5424 2 жыл бұрын
@@essaquadry true and mathematics
@kwzu
@kwzu 2 жыл бұрын
@@sodiboo butterflies
@Zordiak
@Zordiak 2 жыл бұрын
"What language do you program in?" Old guy: Punch cards
@kennygunderman
@kennygunderman 2 жыл бұрын
Lmao
@ingiford175
@ingiford175 2 жыл бұрын
Remember doing my final exam for Cobal on punch cards. Program was due before the 2 hour final (2 week assignment). The final exam, he took all our programs, and dropped them on the floor and told us to reassemble our program.
@delaseadom6800
@delaseadom6800 2 жыл бұрын
I'm crying😭😭😭🤣🤣🤣🤣🤣
@piaoyugexia
@piaoyugexia Жыл бұрын
@@ingiford175 EEP!
@ashwin-7777
@ashwin-7777 Жыл бұрын
🤣
@qmance8062
@qmance8062 Жыл бұрын
I watched this video for the first time a year ago. I had no idea what they were even talking about. Now a year later, i know exactly whats going on and im able to solve pretty much every problem. It feels nice to see progress.
@Itsmebieno
@Itsmebieno Жыл бұрын
I want to do so
@Gupatik
@Gupatik Жыл бұрын
same here
@NostalgicMems
@NostalgicMems 11 ай бұрын
Woah for real? What helped you achieve that
@filyboy7
@filyboy7 9 ай бұрын
same here! i'm on day 20 of angela yu's 100 days of code on udemy, and i was able to solve every question in the video 😁
@Broketechbro
@Broketechbro 9 ай бұрын
@@filyboy7I am also studying that course 😊
@Rakeshyadav-ud8di
@Rakeshyadav-ud8di 2 жыл бұрын
It's great work done by you and for those who are starting career in IT.
@elephantwaffle5612
@elephantwaffle5612 2 жыл бұрын
I nervously watched and attempted the problems being a recent Computer Science graduate (thinking that I wouldn't know and would feel stupid). I learned that I can at least answer simple coding problems! Thanks 4 years of college!
@nickfleming3719
@nickfleming3719 2 жыл бұрын
Yeah but, you spent 4 years and $40,000+ to learn what anybody can learn for free on KZbin in a couple months. And in another 4 years, everything you did learn will be obsolete, but you'll still be paying for it.
@elephantwaffle5612
@elephantwaffle5612 2 жыл бұрын
@@nickfleming3719 instate public college + athletic scholarships + academic scholarships + college isn’t really all about what you learn in your courses + computer science isn’t just being good a programming + L + ur white
@lva98
@lva98 2 жыл бұрын
@@nickfleming3719 Computer Science is not about programming or been a programmer
@nickfleming3719
@nickfleming3719 2 жыл бұрын
@@elephantwaffle5612 ok I see why you needed it
@elephantwaffle5612
@elephantwaffle5612 2 жыл бұрын
@@nickfleming3719 imagine watching a few “how to code” vids on KZbin and then feeling superior enough to make fun of someone for getting a BS in computer science
@NickWhite
@NickWhite 2 жыл бұрын
i think we might be giving money to people that don't really need it...
@MUHAMMADIBRAHIM-gd1xp
@MUHAMMADIBRAHIM-gd1xp 2 жыл бұрын
Or even the coders in this youtube channel
@brentsealy9623
@brentsealy9623 2 жыл бұрын
I'm ok with that.
@user-vi3pi9rf7w
@user-vi3pi9rf7w 2 жыл бұрын
I say try it on kids
@Thunder-dp7du
@Thunder-dp7du 2 жыл бұрын
I thinks homeless person should learn programming
@gugudadah
@gugudadah 2 жыл бұрын
@@Thunder-dp7du right? lol
@Michael89312
@Michael89312 4 ай бұрын
A good solution for two sum is two pointers. We have a variable init to 0 to track current total. Left and right variables track from the start and end of the array. We check if left index element + right element index == sum, if so return it and break out of the function. If not We use a while loop, while total != sum and conditionals that ask if total is > or < sum. If > move the right pointer to the left and if < move left pointer to the right. Either we get a match for sum via two indices or If we check the entire array and there's no match, have a return outside the while loop to return a meaningful message to the user.
@ab.5
@ab.5 Жыл бұрын
grandpa still remembers Fortran 💀 3:25
@Quimerateck
@Quimerateck 2 жыл бұрын
after finishing a course in python programing, i feel prepared to write my print('hello world')
@SlugSage
@SlugSage 2 жыл бұрын
💪🏿
@faevourite
@faevourite 2 жыл бұрын
YES.
@LifeOfJowl
@LifeOfJowl 2 жыл бұрын
Indeed
@drownmeinreverb
@drownmeinreverb 2 жыл бұрын
After taking an advanced python course, i feel prepared to write: def main(): print("hello world") if __name__ == "__main__": main()
@smallypuppy22
@smallypuppy22 2 жыл бұрын
Same here
@Landon_Hughes
@Landon_Hughes 2 жыл бұрын
3:37 didn't know "C+" was a programming language 🤔
@Spero_Hawk
@Spero_Hawk 2 жыл бұрын
It came around the same time as C Flat.
@mesh3218
@mesh3218 2 жыл бұрын
The son of c++ is c+😀😀😀😀😀😀
@mariop4211
@mariop4211 2 жыл бұрын
Lol that’s me! I panicked
@atti1120
@atti1120 2 жыл бұрын
Family with C hashtag
@user-tk2jy8xr8b
@user-tk2jy8xr8b 2 жыл бұрын
Maybe he designed it himself, you can never be sure
@heat-rp1gm
@heat-rp1gm 2 жыл бұрын
Amazing video as usual, keep up the fantastic content, your videos always make my day, thanks, I love the positive vibes, keep it up !!!
@mmiselodlephu3669
@mmiselodlephu3669 Жыл бұрын
First time I watched this video was before I started coding and I had no idea what's happening. I just returned to see how far I've come. It's unbelievable how far I've come in 5 months
@uyscuti5571
@uyscuti5571 2 жыл бұрын
man at 3:37 is like : C , C# ,C+,C++,C+++,C x max pro ,C lite
@kennygunderman
@kennygunderman 2 жыл бұрын
Lmaoo
@MuhammadAwais-rp8po
@MuhammadAwais-rp8po 2 жыл бұрын
😂😂
@KillOnS
@KillOnS 2 жыл бұрын
Don't forget C- and C-- !
@David_Tsintskiladze
@David_Tsintskiladze 2 жыл бұрын
Let's go baby math major :D
@HessW
@HessW 10 ай бұрын
​@@KillOnSbut what about ++C and --C?
@Sad-Lemon
@Sad-Lemon 2 жыл бұрын
An idea: After each question you show the optimal solution and why is it optimal. I interviewed like dozens of programmers and one thing to learn as an interviewer - help the programmer to know what mistake he/she made. We don't want to keep people doing the same errors over and over again. This is counterproductive for the industry.
@arkesh110
@arkesh110 Жыл бұрын
Yeah for the last one, I thought the solution would just be to use a double for loop and an if statement to find the sum of all the combinations and then just return whatever is at those indexes
@bobfarker4001
@bobfarker4001 Жыл бұрын
I feel that way too, but you're asking people on the spot in the street. Without an ide I can't weed out the syntax errors.
@sid6693
@sid6693 Жыл бұрын
@@arkesh110 double for loop is too slow you can do it using 1 and having a set to keep track of the elements you found already
@MyAmazingUsername
@MyAmazingUsername 10 ай бұрын
5:40 He has some typos and syntax errors but the overall concept is great. It makes a dict map of "which remainder maps to the current number". And as soon as it encounters that remainder as a unique number, the dict returns the complementary number that sums with it. Good job coming up with that on the spot.
@bobfarker4001
@bobfarker4001 10 ай бұрын
@@MyAmazingUsername shut up. You're just rehashing what I said with a positive spin.
@dave_thebrave
@dave_thebrave Жыл бұрын
so glad to know! you're going to explain things to me, and appreciate the
@ivandumancic2938
@ivandumancic2938 Жыл бұрын
Q: name 4 programming languages. Guy at 3:45 A: java (0), python (1), javascript (2), c (3), ruby (4)
@squidy5369
@squidy5369 Жыл бұрын
hehe 😂
@YouProductions1000
@YouProductions1000 Жыл бұрын
I am guy at 3:45, I approve hahaha
@sketchturner6669
@sketchturner6669 2 жыл бұрын
5:35 my nigga even doin the exception handling
@arpanghoshal2579
@arpanghoshal2579 2 жыл бұрын
2:06 Does it matter what language? Nah *Processed to write machine code in 0s and 1s*
@emachine003
@emachine003 Жыл бұрын
I have a CS exam today, and I'm practicing for the coding problems by going through and doing each problem in Java. Thanks for this video!
@johndorian4078
@johndorian4078 Жыл бұрын
if these problems are your practice............................... good luck.
@emachine003
@emachine003 Жыл бұрын
@@johndorian4078 took the exam already. It was kind of hard, but not that bad. Honestly, I was more following along for fun than actually preparing for the exam.
@DNGR369
@DNGR369 11 ай бұрын
Thanks for creating problems to solve and saving a Street Programmer out in the wild.
@KhainiSader
@KhainiSader 2 жыл бұрын
would've have been more interesting, if you asked them to just walk it through instead of writing code. This way you can find people who have no clue of coding but have natural design/engineering skills. This would also require you to re-arrange the question for better understanding. Cool :D
@WoWkiddymage
@WoWkiddymage 2 жыл бұрын
That's kinda hard if you don't really understand the basic ruleset that programming provides (ways data/variables are stored, and ways to compare them). But I also think it would be a really good idea.
@mk177
@mk177 2 жыл бұрын
if you don't know anything about coding and the language they cannot test for anything imho obv. analogy here but would a racecardriver prove his talent if he hasn't touched go-karts at a young age. I have been good at math all my life, went up to AP Calc/Passed, but first time I saw a for loop iteration I was astounded, maybe makes it easier to understand after you have seen it but most of coding algos and components making them are kind of like magic tricks, you will need practice (alot) to understand how they are done. My .02
@minhuang8848
@minhuang8848 2 жыл бұрын
@@WoWkiddymage But that's the point, everyone does coding. Everyone who has learned how to manually calculate the root of a given number is pretty much primed to code in their heads, programming is just an abstraction layer to offload strict calculations while the programmer conceptualizes the steps. And yeah, definitely a dope idea, anything to get people involved who didn't think they were suited for it. Maybe some kind of paid bootcamp next where people just get money for learning a basic curriculum, that'd be fun too.
@WoWkiddymage
@WoWkiddymage 2 жыл бұрын
@@minhuang8848 What I'm saying is that these algorithm-based questions are created with restraints that you only understand if you have programmed before. Yes, coding/programming is "just" an abstraction but that is often the difficult part about it. Putting these concepts into the limits of programming data structures and being restricted by time complexities. I think the general idea of pattern recognition/problem solving that is similar to the coding question would create a cool sort of puzzle, but then that would be a totally different type of analysis of the problem if you don't include the ruleset that programming provides. You would basically have to teach someone all the basics of programming to see if they understand how to fit a problem into the constraints that programming provides.
@WoWkiddymage
@WoWkiddymage 2 жыл бұрын
Also, I'm not saying it wouldn't be a good idea. I think it would be really cool to tickle people's brains on the subject. I just think that the implementation of this kind of "social experiment" would be quite difficult, it would cost a lot of effort on the participants not previously understanding the limitations. Who knows though, there might be some cool ways to implement this idea...
@rbt-0007
@rbt-0007 2 жыл бұрын
Wish I was there, literally free money for every single question.
@kennygunderman
@kennygunderman 2 жыл бұрын
Next time
@omairkhaled1709
@omairkhaled1709 2 жыл бұрын
Literally man 😂😂😂
@rachitjasoria9041
@rachitjasoria9041 2 жыл бұрын
seriously bro way to easy ques
@essayedgar
@essayedgar Жыл бұрын
Yeah literally 10 kyu on CodeWars
@akwpython
@akwpython 3 ай бұрын
skillshare is a scam beware search the topic in yt u'd know btw i teach python and c too in hindi.
@charlesreed8420
@charlesreed8420 9 ай бұрын
for the reverse string one, id just put "return inputStr[::-1]"
@aliahmed-vd2nt
@aliahmed-vd2nt Жыл бұрын
for reversing a string simply use slicing string="Ali" print(string[::-1])
@lia_64
@lia_64 Жыл бұрын
That's what i was thinking
@MUHAMMADIBRAHIM-gd1xp
@MUHAMMADIBRAHIM-gd1xp 2 жыл бұрын
That's quite interesting, first of it kind that i have seen.... But you or the person solving it should always walk through the code so that we will learn too
@quanganhbui9503
@quanganhbui9503 2 жыл бұрын
Yesn’t
@ferociousfeind8538
@ferociousfeind8538 2 жыл бұрын
It's always important to make sure the answerer knows how it works, or at least gives an answer that, if the written code doesn't quite do it, does justify the thought process, and checks out.
@djaberomarkahlouche6342
@djaberomarkahlouche6342 2 жыл бұрын
this's a great video , at least you motivate some people to learn coding and don't see coding is a impossible mission. Great video , keep going
@samanmehralipoor9773
@samanmehralipoor9773 2 жыл бұрын
programming languages are easy to learn but becoming a professional developer is not. so I think it's not ok to say everyone "come on start to learning programming".
@thebicycleman8062
@thebicycleman8062 8 ай бұрын
That TWO SUM problem - gosh i finally learnt how to solve it after THREEEE weeks from not knowing a single thing about coding - every single WORD of code felt like being hit by 1000 new bricks, it was probably the hardest thing to ever wrap my head around n now when i think about it - its SUPER logical and optimized - I remember the most concept i codnt fathom was how is a hash map able to sore a key and be able to retrieve it instantly.. that concept I just couldnt wrap my head around. Like how can a hashmap be able to INSTANTLY point to its location in the memory or whatever magical place keys get stored at.. fuk now that i am typin this i am not even sure i fully know!
@jblen
@jblen Жыл бұрын
As a cs student who did a year in industry last year, learning programming can get you a whole lot more than $100. (But a little extra cash is always appreciated, especially for just a few minutes of your time!)
@ahmadmohamad8416
@ahmadmohamad8416 2 жыл бұрын
2:20 hey heeeeeeeeeey lmao
@ayubhaji2441
@ayubhaji2441 2 жыл бұрын
That first girl solution was nice, I been around your channel around the past but this is the first time seeing you do these videos. It's been a while since I solve some problems, these videos awake that feeling in me again.😁
@pomodoro3478
@pomodoro3478 Жыл бұрын
5:20 this challenge can be solve just by using 2 indexes and a for loop to scan the array 1 time since it's ordered
@maniakos_
@maniakos_ Жыл бұрын
You can do it with one index as well
@biniteshome1403
@biniteshome1403 Жыл бұрын
i like the dude who added error handling, catching errors so they don't hit the ground. epic
@GraphicalBoss
@GraphicalBoss 2 жыл бұрын
This coding videos are awesome! I don't get impressed by much but this is very fun and interesting. Love it. Can't wait to see the next one of this.
@user-uo5id1dd5s
@user-uo5id1dd5s 2 жыл бұрын
Awesome idea for a video! You should make it series I'm sure its gonna give you tons of views keep up the good work
@micknamens8659
@micknamens8659 2 жыл бұрын
-- sum2d in Haskell with standard Prelude function 'foldl' : sum2d = foldl (foldl (+)) 0 -- outputting the sample result: main = putStr $ show $ sum2d [[1, 2, 3],[4, 5]]
@luckyambitiousnthani2848
@luckyambitiousnthani2848 2 жыл бұрын
Keep this kind of videos coming man. Very inspiring
@DeepakKumar-xr3oh
@DeepakKumar-xr3oh 2 жыл бұрын
This is something that should be encouraged more. Why would someone dislike this video is beyond my comprehension.
@supriyosarkar5132
@supriyosarkar5132 2 жыл бұрын
To the first girl, who solved the reverse string problem : Nick just forbade you to use inbuilt functions, not inbuilt operators. Simply - string[::-1]
@googleuser4203
@googleuser4203 2 жыл бұрын
It is more of a solving the problem mathematically with basic tools rather than how much do you know about the language itself.
@manankumar3983
@manankumar3983 2 жыл бұрын
op bro . i also thought the same
@carsnnn5018
@carsnnn5018 2 жыл бұрын
Literally posted a comment about that before seeing this one lol
@cgme7076
@cgme7076 2 жыл бұрын
I immediately yelled “LIST COMPREHENSION”
@droidgenetx
@droidgenetx 2 жыл бұрын
noice.
@MyAmazingUsername
@MyAmazingUsername 10 ай бұрын
5:40 He has some typos and syntax errors but the overall concept is great. It makes a dict map of "which remainder maps to the current number". And as soon as it encounters that remainder as a unique number, the dict returns the complementary number that sums with it. Good job coming up with that on the spot.
@TUMATATAN
@TUMATATAN 9 ай бұрын
Honestly, he overcomplicated that. He had the right idea but then went rogue with the syntax and that code is definitely not maintainable. lol
@anar-k-jafarov
@anar-k-jafarov 8 ай бұрын
Numbers in 2d array was continuous, so they could simply write: return (arr[0] + arr[sizeof(arr)-1]) * floor(sizeof(arr)/2) + (floor(sizeof(arr)/2) < sizeof(arr)/2 ? arr[floor(sizeof(arr)/2)] : 0)
@teeraucher
@teeraucher 2 жыл бұрын
its cool to see that so many people are actually getting in to coding. But still I cant stop myself thinking the whole time: "But that's a one liner?!" xD
@piccolaradge8333
@piccolaradge8333 Жыл бұрын
Time pressure 🥲
@kennygunderman
@kennygunderman 2 жыл бұрын
Make sure to check out Nick's video for part 2! kzbin.info/www/bejne/jXXYi5KJlJ6pgsk
@coreyellis3327
@coreyellis3327 Жыл бұрын
One day I’ll be a coder and work at a big data company and reply to this video that I made it! Thanks for all this information time to get started on my journey! 💪
@minoroyale1226
@minoroyale1226 Жыл бұрын
You can do it it's not so hard. I watched this videos months ago before starting to learn and now they are so easy even though i wasn't dedicated to it like i would not code for two whole week .
@Thiago--de6ez
@Thiago--de6ez Жыл бұрын
@@minoroyale1226 fr, to me i'm learning things really quick, might be because i have great willingness to learn.
@TheLemonyOne
@TheLemonyOne Жыл бұрын
how goes the journey fellow dev?
@Zeeshan_Tanwri
@Zeeshan_Tanwri Жыл бұрын
How is your journey going
@coreyellis3327
@coreyellis3327 Жыл бұрын
@@Zeeshan_Tanwri ChatGPT has made me somewhat an expert. Thank you for checking in. Hope everyone's coding journey is going well :))
@memorializers
@memorializers Жыл бұрын
You can optimize the very first code by just doing this in python: *string = str(input("Input Your String: "))* *print(string[::-1])*
@matheustran8009
@matheustran8009 9 ай бұрын
return input(“your string: “)[::-1] input() already returns a string, no need to turn it into a string again
@syedayaanhussain6151
@syedayaanhussain6151 2 жыл бұрын
Q1- #reversing a string in 2 lines inputstr=input("Enter the string here") print(inputstr[::-1])
@halbgefressen9768
@halbgefressen9768 2 жыл бұрын
#imaprogrammerandneedtotelleveryone
@Mariiius53
@Mariiius53 2 жыл бұрын
What language is that ? I never saw " ::- " operator wow
@syedayaanhussain6151
@syedayaanhussain6151 2 жыл бұрын
@@Mariiius53 python and using slicing
@Pong-IT
@Pong-IT 2 жыл бұрын
echo implode('',array_reverse(str_split($string)));
@Mariiius53
@Mariiius53 2 жыл бұрын
Real programmers make it in brainfuck
@FrontEnded
@FrontEnded 2 жыл бұрын
27 years old nd just started to code, i love it btw
@JG-le4n
@JG-le4n Жыл бұрын
Respect to everyone who tried and solved it
@alainirebegashumba4862
@alainirebegashumba4862 9 ай бұрын
This is great I like. This inspired me to continue with my passions.
@anvithkakkera7196
@anvithkakkera7196 2 жыл бұрын
wow, u went from 30k to almost 80k subs! amazing, didn't realize how much ur channel grew recently
@K_CO_GurvinderSingh
@K_CO_GurvinderSingh 2 жыл бұрын
hard part is the complexity or constraints on input data . Thats what makes u apply mathematics
@bradleyhastings2422
@bradleyhastings2422 2 жыл бұрын
The two sum could be done iterating 0
@foolwise4703
@foolwise4703 2 жыл бұрын
Reverse string: lambda str: str[::-1] 2d array sum: lambda arr: np.sum(np.array(arr))
@dj_b1627
@dj_b1627 2 жыл бұрын
That was insanely entertaining and funny. Please do this again.
@PinoyDiskubreChannel
@PinoyDiskubreChannel 2 жыл бұрын
I thought the First guy - Indian guy would solve the Difficult round first...but SAVE by the SECOND Indian guy! WAY TO GO INDIAN TEACHERS on KZbin!!!!
@NoOne-sy5fg
@NoOne-sy5fg 2 жыл бұрын
The hashmap guy was making things complex for himself...when it could be solved so simple in O(N) time complexity
@ivicamajmunskikreten9714
@ivicamajmunskikreten9714 2 жыл бұрын
@@NoOne-sy5fg lol idd, I facepalmed when I heard hashmap.
@MattMcConaha
@MattMcConaha 2 жыл бұрын
@@NoOne-sy5fg I think with a hashmap the problem can be solved in O(N) even if the array isn't sorted. If the array is sorted then you can get O(N) using a more basic method, but I don't think the problem statement specified that the array was necessarily sorted. The hashmap is definitely more complicated in terms of basic operations that would need to be understood, but in code it is all abstracted away and then using the hashmap will end up with cleaner code than the other method that has the same time complexity but only works on a more constrained problem.
@wenreloz
@wenreloz Жыл бұрын
Find the numbers in the array that sums up a given number? You can pick two random numbers in the array inside a while loop.
@abhishankpaul
@abhishankpaul 9 ай бұрын
The old man in the bonus round was an OG
@Rocco7070
@Rocco7070 2 жыл бұрын
awesome video, I want more programming on the street
@kyuss789
@kyuss789 2 жыл бұрын
Super interesting watching people solve this stuff. Every question I was like “oh yeah just do this” then they come up with something completely different. $200 dollar guy threw me right off
@JordanMetroidManiac
@JordanMetroidManiac 2 жыл бұрын
He found an O(n) solution, iterating over the array exactly three times to determine a solution if any exist, when the naïve solution is O(n^2), using nested loops. I didn’t see the hashmap solution lol. He deserves the $200.
@quasii7
@quasii7 2 жыл бұрын
But he made a small mistake. In Python list object doesn't have any attribute called length, len(arr) would have been correct instead
@JordanMetroidManiac
@JordanMetroidManiac 2 жыл бұрын
@@quasii7 Yeah. He had the right idea though and definitely could have debugged it given the chance.
@RandomVideos-yz5qf
@RandomVideos-yz5qf Жыл бұрын
@@JordanMetroidManiac He had the right idea with the subtraction and then finding the other value within the remainder of the array, not sure why he overcomplicated it by using the hashmap as his first attempt. Interesting to see regardless.
@sidharth8007
@sidharth8007 Жыл бұрын
@@RandomVideos-yz5qf That's a O(N^2) solution though since you need two for loops. The way he did it (storing using a dictionary), you can do it in a single loop O(N) solution.
@johnshaw6702
@johnshaw6702 Жыл бұрын
In most modern languages, the simplest answer is the same. You could write it in C and you've already covered C++, C#, and others. There my be some difference in syntax, but the algorithm is the same.
@thestranger8352
@thestranger8352 Жыл бұрын
solved all the questions with simple solutions feeling confident for some weird reasons becoz i am second year it student
@MrNsaysHi
@MrNsaysHi 2 жыл бұрын
competitive programmers: “are you insulating our traditions?”
@sirwee_
@sirwee_ Жыл бұрын
The 2sum guy is my hero, the man hand writes error handling into it for no reason ❤️
@cringe2474
@cringe2474 2 жыл бұрын
Cool! Make more of these type of videos!
@jonathangigi3163
@jonathangigi3163 2 жыл бұрын
if only the questions in the test were this simple
@hanac5586
@hanac5586 Жыл бұрын
You met such nice people, wholesome
@Random-ey7tq
@Random-ey7tq 2 жыл бұрын
THE GOLDEN RULE of coding; if you stuck in a question, just throw a hashmap to it. 90% of the time you'll make at least some progress...
@mugu007
@mugu007 2 жыл бұрын
3:37 that man just bluffed his way across with C+ as a language and still got that cash.
@ericjorgearnezinochea9679
@ericjorgearnezinochea9679 2 жыл бұрын
All of them were pretty easy. Thank you. I still have some imposter syndrome and this helped.
@yoshiontheloose
@yoshiontheloose 2 жыл бұрын
When you have imposter syndrome, think of the robot guy from Grandma's Boy and laugh about that character lol. You're doing great, keep it up and code everyday.
@datcate9116
@datcate9116 2 жыл бұрын
This is my week 4 of CS and I'm alr stressing that I don't understand any of these lol
@billr5842
@billr5842 2 жыл бұрын
@@datcate9116 I am in my first hour of CS and I dont understand any of this
@datcate9116
@datcate9116 2 жыл бұрын
@@billr5842 I'm no longer in CS HAHA
@alejandromichelena66
@alejandromichelena66 Жыл бұрын
if youre interested in a better way for the reversed string (in python): def reverse(st): result = '' for index in range(len(st)): result += st[-(index + 1)] return result all you do is use the regressive index (iterable_variable[-value]) in python to sum each respective character in a loop.
@LambdaSan
@LambdaSan 11 ай бұрын
or even better str = str[::-1]
@solaire_of_the_east
@solaire_of_the_east 11 ай бұрын
@LambdaSan Bruh, that's what I was thinking. All these people defining function for a simple task.
@dizzyaaron
@dizzyaaron 2 жыл бұрын
Kenny where have you been my brotha!? Cant belive I am JUST finding out about your channel! Haha! Keep up the videos brotha! Great production quality!
@kennygunderman
@kennygunderman 2 жыл бұрын
The first 1,000 people to use this link will get a 1 month free trial of Skillshare! skl.sh/kennygunderman07211
@7heMech
@7heMech 2 жыл бұрын
Can't even get it for the lack of card
@zeno6336
@zeno6336 2 жыл бұрын
@@7heMech exactly
@NaveenKumar-os8dv
@NaveenKumar-os8dv 2 жыл бұрын
Thank u very much
@gowthamkowshik8815
@gowthamkowshik8815 2 жыл бұрын
Kind hearted man! ☺️
@HiHi-ek1dd
@HiHi-ek1dd 2 жыл бұрын
Ok
@Skatinima
@Skatinima 2 жыл бұрын
I would never thought of using a hashmap and exceptions to solve the last one. All that was needed was two pointers, one starting in the beginning and the other at the end, keep checking the sum and move the appropriate pointer if the sum if bigger or smaller than the target.
@user-fd8nj6tx8f
@user-fd8nj6tx8f 2 жыл бұрын
it can be done only on sorted array so complexity is O(nlogn). Using hashmap u have O(n) but also same memory complexity
@flavorlessquark8614
@flavorlessquark8614 2 жыл бұрын
@@user-fd8nj6tx8f I think the leetcode one times you out if you use the naive approach, if he the guy in the video had done it on leetcode he probably remembers doing it that way because that's a way that will get your answer validated
@Vikas_Kumar_Singh
@Vikas_Kumar_Singh 2 жыл бұрын
@@flavorlessquark8614 yep and since its the first code on leetcode I think the average coders might have already solved it since when they teach DSA in courses they try combination sum as the first question to solve usually
@flavorlessquark8614
@flavorlessquark8614 2 жыл бұрын
@@Vikas_Kumar_Singh I would like to think that most coders, as mysef, are self thaught. It's also a thing to solve it, as it is another to solve it efficiently
@ferociousfeind8538
@ferociousfeind8538 2 жыл бұрын
The array is sorted?
@Ounisimo
@Ounisimo 11 ай бұрын
The guy that solve the second problem was so confident, he sould start a youtube channel
@edison2964
@edison2964 2 жыл бұрын
As a Comp Science student who has graduated, I didn’t understand a word or any idea what they were all saying except when they asked to name the languages
@bubble418
@bubble418 2 жыл бұрын
bro with the indian accent said i haven’t done this in a while but pulled out the optimal solution😭😭😭😭😭😭😭
@aryelpanda
@aryelpanda 2 жыл бұрын
you should zoom even for a second on the code, each time so we can have a look at it.
@anthonythompson3806
@anthonythompson3806 2 жыл бұрын
Passing in an array of sub arrays use arr.flat(Infinity) and then run that through a for loop -- JS.
@jw1ck
@jw1ck 2 жыл бұрын
Bro the one kid that goes, “EY” when he says Java doesn’t count 😂
@digitalmoustache8416
@digitalmoustache8416 2 жыл бұрын
Sponsored by Skillshare, Udemy getting all the PROMOTION is just hilarious. Thanks Skillshare LOL 😂
@FaeRhanX
@FaeRhanX 2 жыл бұрын
The first question my head produced was "in which time complexity can I do it?"
@yueruan1672
@yueruan1672 2 жыл бұрын
What camera are you using for the end segment 6:30 . The video quality is awesome
@Kabeer2004
@Kabeer2004 2 жыл бұрын
the way i thought of doing the twosum question after you explained it was to have two for loops (like a nested loop) so the outer loop will pick one number at a time from the array and then with the inner one you check the sum with every other element except itself to see if you can get the sum and if sumarray==sum then you can easily print the numbers because you already have their indexes from the for loop can be implemented in any popular language of course taking the sum and subtracting each element and then checking for the difference in the array was an interesting approach to me very cool video :) subbed
@DogeMultiverse
@DogeMultiverse 2 жыл бұрын
in this case, the array is sorted. so you don't actually need to double loop through every element in the array. as long as the sum is bigger than the target sum, you can skip the 2nd level loop
@Kabeer2004
@Kabeer2004 2 жыл бұрын
@@DogeMultiverse you're right didnt think of that
@ferociousfeind8538
@ferociousfeind8538 2 жыл бұрын
@@DogeMultiverse is there a guarantee that any given array will be sorted...?
@amatera2
@amatera2 Жыл бұрын
So the thing is, the solution you thought of definitely works, and it's even the first solution most people would think of. But the problem with it is that it doesn't scale well. If you have an array with a million elements, then you'll need to do a million comparisons and that's just for the first element. On the second one you will do a million - 1 comparisons and so on and so forth. It's perfectly acceptable with a small input but when the array becomes very large running it this way becomes very time consuming, as opposed to the hash map method where you only need to do, at most, a million operations in this example since you only iterate over the array once. This is an entire topic called "Time Complexity" and it's quite important to keep in mind if your use case requires super efficient code.
@crayder1100
@crayder1100 2 жыл бұрын
I wanna agree with that fella at the end, programming is an essential skill. People use the skills needed for programming all the time already. But learning programming languages, efficiently writing algorithms, learning how to best store information, etc, all of these surprisingly make thinking and processing information easier for me. I don't know how to explain it. Which brings up a good side point, I SUCK at explaining things. But thinking about things in a programming sense helps with that too.
@PySnek
@PySnek 2 жыл бұрын
You also need the skill of plumbing every day to take a shit on your toilet, or the skill of an electrician, to give power to your computer. Today everyones flying, do you also need to know the basics of operating an airbus or boeing airliner? You wear clothes everyday... why don't you learn how to sew and manufacture shoes, pants, jackets? Life's short, people are into different things. Not everyone want's to learn how to code, or how hardware works. Most people don't even understand, how a car motor runs, or how we breath with our lungs in detail. Do you know, how to help a woman giving birth? This should be an essential skill in my opinion. Nothing's more essential, than the creation of a new human beeing.
@mariam6799
@mariam6799 6 ай бұрын
​@user-hq4cj6rw7b "Programming is an essential skill". "CAN YOU FLY AN AIRBUS HUHH"
@mariam6799
@mariam6799 6 ай бұрын
​@@PySnekDude, chill out. Programming is a more valuable work than making clothes just from the fact that its used in more than 100 careers for various stuff. If you don't like it, don't learn. But denying it's importance shows how immature you are 😂
@Webberjo
@Webberjo 5 ай бұрын
I would've done that last one using using two for loops. Not elegant, but effective.
@nicreven
@nicreven Жыл бұрын
The funny thing about C is that the "sum of a matrix" problem can just be done like for(int i = 0; i < length; i++) sum += matrix[i]; since matrices are almost the exact same as 1d arrays
@bultvidxxxix9973
@bultvidxxxix9973 11 ай бұрын
That depends on how the matrix was created. If the matrix is a jagged array you'll just sum up the pointers with that code.
@sonikblade
@sonikblade 2 жыл бұрын
The C# programmer was cut out of the video in the twosum equals 9 problem, cause Kenny gave him the prize instantly the moment he saw Foreach written in the whiteboard.
@sneak9407
@sneak9407 Жыл бұрын
Yep, it's foreach has worse performance than regular for loops. No need to let people see that solution and start considering it a good approach.
@sonikblade
@sonikblade Жыл бұрын
@@sneak9407 I garantee you that the whiteboard would not have enough RAM for any of both approaches
@sneak9407
@sneak9407 Жыл бұрын
@@sonikblade lmao.
@viepng
@viepng Жыл бұрын
Remember y'all, of you ever get stuck on an interview question, throw a hash map at it
@Taterzz
@Taterzz Жыл бұрын
if there's anything i learned from my astronomy degree, it's that everything can be solved with for loops.
@mahadmohamed2748
@mahadmohamed2748 2 жыл бұрын
I would answer this question like a true data scientist. Using matrix multiplication: for the matrix A you could consider the quadratic form e⊤Ae, where e is the column vector whose entries are all 1's.
@wizardsuth
@wizardsuth Жыл бұрын
You might want to code your solution in APL.
@Fuze_Youtube
@Fuze_Youtube 2 жыл бұрын
I live in Chicago, I'm currently enrolled in college, going for my bachelor's in game design. I can't wait to be able to do this.
@Shay001
@Shay001 Жыл бұрын
“when will we need this in life” This. This is when you need it.
@flew6176
@flew6176 Жыл бұрын
for the first exercices just need to write : string[::-1]
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 486 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,3 МЛН
How did CatNap end up in Luca cartoon?🙀
00:16
LOL
Рет қаралды 7 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 113 МЛН
Каха с волосами
01:00
К-Media
Рет қаралды 6 МЛН
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 145 МЛН
Advice from the Top 1% of Software Engineers
10:21
Kevin Naughton Jr.
Рет қаралды 3,1 МЛН
Winning Google Kickstart Round C 2020
30:57
William Lin
Рет қаралды 3,9 МЛН
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 510 М.
5 Years of Coding in under a Minute #shorts
0:56
Abhi
Рет қаралды 5 МЛН
How to Get RICH from Coding
12:17
Kenny Gunderman
Рет қаралды 89 М.
Software engineer interns on their first day be like...
2:21
Frying Pan
Рет қаралды 13 МЛН
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
Every programming tutorial
0:29
Jombo
Рет қаралды 15 МЛН
Programming Language Tier List
0:55
Conner Ardman
Рет қаралды 2,4 МЛН
Coding for 1 Month Versus 1 Year #shorts #coding
0:24
Devslopes
Рет қаралды 4 МЛН
APPLE УБИЛА ЕГО - iMac 27 5K
19:34
ЗЕ МАККЕРС
Рет қаралды 101 М.
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 1,7 МЛН
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,1 МЛН
Introducing the all-new iPad Pro | Apple
1:29
Apple
Рет қаралды 37 МЛН