Solve This Coding Problem and Win $200

2021 ж. 18 Шіл.
2 450 889 Рет қаралды

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 KZhead channel:
kzhead.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

Пікірлер
  • a real programmer won’t go outside

    @godofpro5767@godofpro57672 жыл бұрын
    • based

      @RedStone576@RedStone5762 жыл бұрын
    • based

      @Sp4wn_@Sp4wn_2 жыл бұрын
    • based

      @tedlopez1368@tedlopez13682 жыл бұрын
    • based

      @MrBruh-xc1qy@MrBruh-xc1qy2 жыл бұрын
    • I'll rune the joke Also your right

      @SolathPrime@SolathPrime2 жыл бұрын
  • 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..

    @secabrepheox5450@secabrepheox54502 жыл бұрын
    • hahaha

      @kingbrianmendes@kingbrianmendes2 жыл бұрын
    • so lazy…

      @punu3675@punu36752 жыл бұрын
    • Lol

      @justarandomguy1541@justarandomguy15412 жыл бұрын
    • Yea like really they should stop being lazy. I had already graduated by the time I was 3.

      @notcrispeeweevile1388@notcrispeeweevile13882 жыл бұрын
    • You kinda need to read first in order to understand coding :P (and yes I know this is most likely a joke lel)

      @nardalis4832@nardalis48322 жыл бұрын
  • 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

    @Bayers2020@Bayers20202 жыл бұрын
    • Issue is not everyone enjoys it

      @sudonim116@sudonim1162 жыл бұрын
    • So is math yet so many people hate it with passion regardless of their potential.

      @mtutoriales@mtutoriales Жыл бұрын
    • I feel the same way about boards. Everyone should at least skateboard, surf, Onewheel, etc. Progress toward peace and no hunger, imagine it xD

      @TheAnimeist@TheAnimeist Жыл бұрын
    • bruh nothing is hard if you apply yourself. Its just memorizing things. Like advanced maths. Just some people dont care to learn

      @angelsaucedo2231@angelsaucedo2231 Жыл бұрын
    • @@mtutoriales I think it mostly depends on the teacher. It's also because of the reputation that maths has as "the hard subject".

      @uku4171@uku4171 Жыл бұрын
  • 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.

    @brownbearedurardo@brownbearedurardo Жыл бұрын
  • 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.

    @stxnw@stxnw2 жыл бұрын
    • they fear to the sun

      @soruzein2988@soruzein29882 жыл бұрын
    • just want everybody to know that i am all green on my github

      @stxnw@stxnw2 жыл бұрын
    • 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)).

      @mohitsagar9492@mohitsagar94922 жыл бұрын
    • @@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.

      @stxnw@stxnw2 жыл бұрын
    • @@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!

      @mohitsagar9492@mohitsagar94922 жыл бұрын
  • "In java it doesnt work" Man rethought his existence in .5 second 🤣🤣

    @danielgeorgianni1687@danielgeorgianni16872 жыл бұрын
    • Hahaha "Why am I here, What purpose do I have"

      @ericjohn2352@ericjohn23522 жыл бұрын
    • Hey! 🤣

      @putramakatita8814@putramakatita88142 жыл бұрын
    • i did this in java in 5 mins

      @dgh25@dgh252 жыл бұрын
    • In Java it would be easy for me to do it however I don’t knw any other programming language yet

      @Omar-kl3xp@Omar-kl3xp2 жыл бұрын
    • I know python the easiest one

      @iamgroot1328@iamgroot13282 жыл бұрын
  • 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.

    @emachine003@emachine003 Жыл бұрын
    • no shit XDDD thats y she couldnt use it

      @meelaud2103@meelaud2103 Жыл бұрын
    • You're right, Since Python is written in C, the library functions are super fast.

      @apostate101@apostate101 Жыл бұрын
    • @@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".

      @bronzejourney5784@bronzejourney5784 Жыл бұрын
    • Recursivity always calling the function + char of the current position until the length of the string would work well too

      @joaofernandes6419@joaofernandes6419 Жыл бұрын
    • @@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.

      @trashbox9511@trashbox951111 ай бұрын
  • 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...

    @kaiacrisp@kaiacrisp2 жыл бұрын
    • in what U toke it

      @momenmohamed8337@momenmohamed8337 Жыл бұрын
    • same here,that hits different

      @IllIIIIIIllll@IllIIIIIIllll Жыл бұрын
    • @@momenmohamed8337 in a intro to CS college class

      @kaiacrisp@kaiacrisp Жыл бұрын
    • If a online class drop the link

      @vanci2039@vanci2039 Жыл бұрын
    • @@vanci2039 kzhead.info/sun/fbRwebiBj3mme6M/bejne.html

      @dv5625@dv5625 Жыл бұрын
  • When grandpa comes out swinging like, "binary, assembly, matlab, basic, that's what I used to use when I was a kid"

    @clucl3@clucl32 жыл бұрын
    • cosmic rays

      @sodiboo@sodiboo2 жыл бұрын
    • Cobol, fortran

      @justapugontheinternet@justapugontheinternet2 жыл бұрын
    • Matlab is still used by Engineers

      @essaquadry@essaquadry2 жыл бұрын
    • @@essaquadry true and mathematics

      @markushandel5424@markushandel54242 жыл бұрын
    • @@sodiboo butterflies

      @kwzu@kwzu2 жыл бұрын
  • "What language do you program in?" Old guy: Punch cards

    @Zordiak@Zordiak2 жыл бұрын
    • Lmao

      @kennygunderman@kennygunderman2 жыл бұрын
    • 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.

      @ingiford175@ingiford1752 жыл бұрын
    • I'm crying😭😭😭🤣🤣🤣🤣🤣

      @delaseadom6800@delaseadom68002 жыл бұрын
    • @@ingiford175 EEP!

      @piaoyugexia@piaoyugexia Жыл бұрын
    • 🤣

      @ashwin-7777@ashwin-7777 Жыл бұрын
  • It's great work done by you and for those who are starting career in IT.

    @Rakeshyadav-ud8di@Rakeshyadav-ud8di2 жыл бұрын
  • Amazing video as usual, keep up the fantastic content, your videos always make my day, thanks, I love the positive vibes, keep it up !!!

    @heat-rp1gm@heat-rp1gm2 жыл бұрын
  • i think we might be giving money to people that don't really need it...

    @NickWhite@NickWhite2 жыл бұрын
    • Or even the coders in this youtube channel

      @MUHAMMADIBRAHIM-gd1xp@MUHAMMADIBRAHIM-gd1xp2 жыл бұрын
    • I'm ok with that.

      @brentsealy9623@brentsealy96232 жыл бұрын
    • I say try it on kids

      @user-vi3pi9rf7w@user-vi3pi9rf7w2 жыл бұрын
    • I thinks homeless person should learn programming

      @Thunder-dp7du@Thunder-dp7du2 жыл бұрын
    • @@Thunder-dp7du right? lol

      @gugudadah@gugudadah2 жыл бұрын
  • 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!

    @elephantwaffle5612@elephantwaffle56122 жыл бұрын
    • Yeah but, you spent 4 years and $40,000+ to learn what anybody can learn for free on KZhead in a couple months. And in another 4 years, everything you did learn will be obsolete, but you'll still be paying for it.

      @nickfleming3719@nickfleming37192 жыл бұрын
    • @@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

      @elephantwaffle5612@elephantwaffle56122 жыл бұрын
    • @@nickfleming3719 Computer Science is not about programming or been a programmer

      @lva98@lva982 жыл бұрын
    • @@elephantwaffle5612 ok I see why you needed it

      @nickfleming3719@nickfleming37192 жыл бұрын
    • @@nickfleming3719 imagine watching a few “how to code” vids on KZhead and then feeling superior enough to make fun of someone for getting a BS in computer science

      @elephantwaffle5612@elephantwaffle56122 жыл бұрын
  • 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.

    @qmance8062@qmance8062 Жыл бұрын
    • I want to do so

      @Itsmebieno@Itsmebieno Жыл бұрын
    • same here

      @Gupatik@Gupatik Жыл бұрын
    • Woah for real? What helped you achieve that

      @NostalgicMems@NostalgicMems11 ай бұрын
    • 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 😁

      @filyboy7@filyboy79 ай бұрын
    • @@filyboy7I am also studying that course 😊

      @Broketechbro@Broketechbro9 ай бұрын
  • Keep this kind of videos coming man. Very inspiring

    @luckyambitiousnthani2848@luckyambitiousnthani28482 жыл бұрын
  • after finishing a course in python programing, i feel prepared to write my print('hello world')

    @Quimerateck@Quimerateck2 жыл бұрын
    • 💪🏿

      @SlugSage@SlugSage2 жыл бұрын
    • YES.

      @faevourite@faevourite2 жыл бұрын
    • Indeed

      @LifeOfJowl@LifeOfJowl2 жыл бұрын
    • After taking an advanced python course, i feel prepared to write: def main(): print("hello world") if __name__ == "__main__": main()

      @drownmeinreverb@drownmeinreverb2 жыл бұрын
    • Same here

      @smallypuppy22@smallypuppy222 жыл бұрын
  • 3:37 didn't know "C+" was a programming language 🤔

    @Landon_Hughes@Landon_Hughes2 жыл бұрын
    • It came around the same time as C Flat.

      @Spero_Hawk@Spero_Hawk2 жыл бұрын
    • The son of c++ is c+😀😀😀😀😀😀

      @mesh3218@mesh32182 жыл бұрын
    • Lol that’s me! I panicked

      @mariop4211@mariop42112 жыл бұрын
    • Family with C hashtag

      @atti1120@atti11202 жыл бұрын
    • Maybe he designed it himself, you can never be sure

      @user-tk2jy8xr8b@user-tk2jy8xr8b2 жыл бұрын
  • grandpa still remembers Fortran 💀 3:25

    @ab.5@ab.5 Жыл бұрын
  • 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.

    @Michael89312@Michael893124 ай бұрын
  • man at 3:37 is like : C , C# ,C+,C++,C+++,C x max pro ,C lite

    @uyscuti5571@uyscuti55712 жыл бұрын
    • Lmaoo

      @kennygunderman@kennygunderman2 жыл бұрын
    • 😂😂

      @MuhammadAwais-rp8po@MuhammadAwais-rp8po2 жыл бұрын
    • Don't forget C- and C-- !

      @KillOnS@KillOnS2 жыл бұрын
    • Let's go baby math major :D

      @David_Tsintskiladze@David_Tsintskiladze2 жыл бұрын
    • ​@@KillOnSbut what about ++C and --C?

      @HessW@HessW10 ай бұрын
  • 2:06 Does it matter what language? Nah *Processed to write machine code in 0s and 1s*

    @arpanghoshal2579@arpanghoshal25792 жыл бұрын
  • so glad to know! you're going to explain things to me, and appreciate the

    @dave_thebrave@dave_thebrave Жыл бұрын
  • 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

    @mmiselodlephu3669@mmiselodlephu3669 Жыл бұрын
  • 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.

    @Sad-Lemon@Sad-Lemon2 жыл бұрын
    • 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

      @arkesh110@arkesh110 Жыл бұрын
    • 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.

      @bobfarker4001@bobfarker4001 Жыл бұрын
    • @@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

      @sid6693@sid6693 Жыл бұрын
    • 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.

      @MyAmazingUsername@MyAmazingUsername10 ай бұрын
    • @@MyAmazingUsername shut up. You're just rehashing what I said with a positive spin.

      @bobfarker4001@bobfarker400110 ай бұрын
  • 2:20 hey heeeeeeeeeey lmao

    @ahmadmohamad8416@ahmadmohamad84162 жыл бұрын
  • 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!

    @emachine003@emachine003 Жыл бұрын
    • if these problems are your practice............................... good luck.

      @johndorian4078@johndorian4078 Жыл бұрын
    • @@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.

      @emachine003@emachine003 Жыл бұрын
  • 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.

    @MyAmazingUsername@MyAmazingUsername10 ай бұрын
    • Honestly, he overcomplicated that. He had the right idea but then went rogue with the syntax and that code is definitely not maintainable. lol

      @TUMATATAN@TUMATATAN9 ай бұрын
  • 5:35 my nigga even doin the exception handling

    @sketchturner6669@sketchturner66692 жыл бұрын
  • 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

    @djaberomarkahlouche6342@djaberomarkahlouche63422 жыл бұрын
    • 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".

      @samanmehralipoor9773@samanmehralipoor97732 жыл бұрын
  • Thanks for creating problems to solve and saving a Street Programmer out in the wild.

    @DNGR369@DNGR36911 ай бұрын
  • 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

    @pomodoro3478@pomodoro3478 Жыл бұрын
    • You can do it with one index as well

      @maniakos_@maniakos_ Жыл бұрын
  • 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.

    @GraphicalBoss@GraphicalBoss2 жыл бұрын
  • 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.😁

    @ayubhaji2441@ayubhaji24412 жыл бұрын
  • 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!

    @dizzyaaron@dizzyaaron2 жыл бұрын
  • I just found this, its amazing I love your content

    @gladiusrt8542@gladiusrt85422 жыл бұрын
  • 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

    @user-uo5id1dd5s@user-uo5id1dd5s2 жыл бұрын
  • 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

    @KhainiSader@KhainiSader2 жыл бұрын
    • 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.

      @WoWkiddymage@WoWkiddymage2 жыл бұрын
    • 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

      @mk177@mk1772 жыл бұрын
    • @@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.

      @minhuang8848@minhuang88482 жыл бұрын
    • @@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@WoWkiddymage2 жыл бұрын
    • 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...

      @WoWkiddymage@WoWkiddymage2 жыл бұрын
  • 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!)

    @jblen@jblen Жыл бұрын
  • The two sum could be done iterating 0

    @bradleyhastings2422@bradleyhastings24222 жыл бұрын
  • 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

    @MUHAMMADIBRAHIM-gd1xp@MUHAMMADIBRAHIM-gd1xp2 жыл бұрын
    • Yesn’t

      @quanganhbui9503@quanganhbui95032 жыл бұрын
    • 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.

      @ferociousfeind8538@ferociousfeind85382 жыл бұрын
  • That was insanely entertaining and funny. Please do this again.

    @dj_b1627@dj_b16272 жыл бұрын
  • what a nice Video bro! greetings from Germany. Do more Videos like that, love to see New York :D really nice view

    @zerotechighqualitytutorial568@zerotechighqualitytutorial5682 жыл бұрын
  • for reversing a string simply use slicing string="Ali" print(string[::-1])

    @aliahmed-vd2nt@aliahmed-vd2nt Жыл бұрын
    • That's what i was thinking

      @lia_64@lia_64 Жыл бұрын
  • Wish I was there, literally free money for every single question.

    @rbt-0007@rbt-00072 жыл бұрын
    • Next time

      @kennygunderman@kennygunderman2 жыл бұрын
    • Literally man 😂😂😂

      @omairkhaled1709@omairkhaled17092 жыл бұрын
    • seriously bro way to easy ques

      @rachitjasoria9041@rachitjasoria90412 жыл бұрын
    • Yeah literally 10 kyu on CodeWars

      @essayedgar@essayedgar Жыл бұрын
    • skillshare is a scam beware search the topic in yt u'd know btw i teach python and c too in hindi.

      @akwpython@akwpython3 ай бұрын
  • Cool! Make more of these type of videos!

    @cringe2474@cringe24742 жыл бұрын
  • 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

    @Kabeer2004@Kabeer20042 жыл бұрын
    • 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

      @DogeMultiverse@DogeMultiverse2 жыл бұрын
    • @@DogeMultiverse you're right didnt think of that

      @Kabeer2004@Kabeer20042 жыл бұрын
    • @@DogeMultiverse is there a guarantee that any given array will be sorted...?

      @ferociousfeind8538@ferociousfeind85382 жыл бұрын
    • 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.

      @amatera2@amatera2 Жыл бұрын
  • i like the dude who added error handling, catching errors so they don't hit the ground. epic

    @biniteshome1403@biniteshome1403 Жыл бұрын
  • wow, u went from 30k to almost 80k subs! amazing, didn't realize how much ur channel grew recently

    @anvithkakkera7196@anvithkakkera71962 жыл бұрын
  • This is something that should be encouraged more. Why would someone dislike this video is beyond my comprehension.

    @DeepakKumar-xr3oh@DeepakKumar-xr3oh2 жыл бұрын
  • This is great I like. This inspired me to continue with my passions.

    @alainirebegashumba4862@alainirebegashumba48629 ай бұрын
  • -- 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]]

    @micknamens8659@micknamens86592 жыл бұрын
  • awesome video, I want more programming on the street

    @Rocco7070@Rocco70702 жыл бұрын
  • Q1- #reversing a string in 2 lines inputstr=input("Enter the string here") print(inputstr[::-1])

    @syedayaanhussain6151@syedayaanhussain61512 жыл бұрын
    • #imaprogrammerandneedtotelleveryone

      @halbgefressen9768@halbgefressen97682 жыл бұрын
    • What language is that ? I never saw " ::- " operator wow

      @Mariiius53@Mariiius532 жыл бұрын
    • @@Mariiius53 python and using slicing

      @syedayaanhussain6151@syedayaanhussain61512 жыл бұрын
    • echo implode('',array_reverse(str_split($string)));

      @Pong-IT@Pong-IT2 жыл бұрын
    • Real programmers make it in brainfuck

      @Mariiius53@Mariiius532 жыл бұрын
  • Respect to everyone who tried and solved it

    @JG-le4n@JG-le4n Жыл бұрын
  • 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! 💪

    @coreyellis3327@coreyellis3327 Жыл бұрын
    • 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 .

      @minoroyale1226@minoroyale1226 Жыл бұрын
    • @@minoroyale1226 fr, to me i'm learning things really quick, might be because i have great willingness to learn.

      @Thiago--de6ez@Thiago--de6ez Жыл бұрын
    • how goes the journey fellow dev?

      @TheLemonyOne@TheLemonyOne Жыл бұрын
    • How is your journey going

      @Zeeshan_Tanwri@Zeeshan_Tanwri Жыл бұрын
    • @@Zeeshan_Tanwri ChatGPT has made me somewhat an expert. Thank you for checking in. Hope everyone's coding journey is going well :))

      @coreyellis3327@coreyellis3327 Жыл бұрын
  • hard part is the complexity or constraints on input data . Thats what makes u apply mathematics

    @K_CO_GurvinderSingh@K_CO_GurvinderSingh2 жыл бұрын
  • 27 years old nd just started to code, i love it btw

    @FrontEnded@FrontEnded2 жыл бұрын
  • The editing is great!

    @hanac5586@hanac5586 Жыл бұрын
  • i subbed since this was fun as a geek to watch

    @bloeffmaximus6937@bloeffmaximus6937 Жыл бұрын
  • To the first girl, who solved the reverse string problem : Nick just forbade you to use inbuilt functions, not inbuilt operators. Simply - string[::-1]

    @supriyosarkar5132@supriyosarkar51322 жыл бұрын
    • It is more of a solving the problem mathematically with basic tools rather than how much do you know about the language itself.

      @googleuser4203@googleuser42032 жыл бұрын
    • op bro . i also thought the same

      @manankumar3983@manankumar39832 жыл бұрын
    • Literally posted a comment about that before seeing this one lol

      @carsnnn5018@carsnnn50182 жыл бұрын
    • I immediately yelled “LIST COMPREHENSION”

      @cgme7076@cgme70762 жыл бұрын
    • noice.

      @droidgenetx@droidgenetx2 жыл бұрын
  • 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

    @teeraucher@teeraucher2 жыл бұрын
    • Time pressure 🥲

      @piccolaradge8333@piccolaradge8333 Жыл бұрын
  • 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.

    @johnshaw6702@johnshaw6702 Жыл бұрын
  • You met such nice people, wholesome

    @hanac5586@hanac5586 Жыл бұрын
  • 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.

    @Skatinima@Skatinima2 жыл бұрын
    • it can be done only on sorted array so complexity is O(nlogn). Using hashmap u have O(n) but also same memory complexity

      @user-fd8nj6tx8f@user-fd8nj6tx8f2 жыл бұрын
    • @@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

      @flavorlessquark8614@flavorlessquark86142 жыл бұрын
    • @@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

      @Vikas_Kumar_Singh@Vikas_Kumar_Singh2 жыл бұрын
    • @@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

      @flavorlessquark8614@flavorlessquark86142 жыл бұрын
    • The array is sorted?

      @ferociousfeind8538@ferociousfeind85382 жыл бұрын
  • 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 KZhead!!!!

    @PinoyDiskubreChannel@PinoyDiskubreChannel2 жыл бұрын
    • The hashmap guy was making things complex for himself...when it could be solved so simple in O(N) time complexity

      @NoOne-sy5fg@NoOne-sy5fg2 жыл бұрын
    • @@NoOne-sy5fg lol idd, I facepalmed when I heard hashmap.

      @ivicamajmunskikreten9714@ivicamajmunskikreten97142 жыл бұрын
    • @@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.

      @MattMcConaha@MattMcConaha2 жыл бұрын
  • 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!

    @thebicycleman8062@thebicycleman80628 ай бұрын
  • I really enjoy this vid❤️❤️❤️ im so happy seeing these people coding❤️ btw I'm an IT major☺️

    @rajiruarts6247@rajiruarts62472 жыл бұрын
  • competitive programmers: “are you insulating our traditions?”

    @MrNsaysHi@MrNsaysHi2 жыл бұрын
  • 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

    @kyuss789@kyuss7892 жыл бұрын
    • 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.

      @JordanMetroidManiac@JordanMetroidManiac2 жыл бұрын
    • But he made a small mistake. In Python list object doesn't have any attribute called length, len(arr) would have been correct instead

      @quasii7@quasii72 жыл бұрын
    • @@quasii7 Yeah. He had the right idea though and definitely could have debugged it given the chance.

      @JordanMetroidManiac@JordanMetroidManiac2 жыл бұрын
    • @@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.

      @RandomVideos-yz5qf@RandomVideos-yz5qf Жыл бұрын
    • @@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.

      @sidharth8007@sidharth8007 Жыл бұрын
  • Exacto, son los mejores, esperemos sigan siendolo.

    @GUESSMM@GUESSMMАй бұрын
  • 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.

    @crayder1100@crayder11002 жыл бұрын
    • 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.

      @PySnek@PySnek2 жыл бұрын
    • ​@user-hq4cj6rw7b "Programming is an essential skill". "CAN YOU FLY AN AIRBUS HUHH"

      @mariam6799@mariam67995 ай бұрын
    • ​@@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 😂

      @mariam6799@mariam67995 ай бұрын
  • All of them were pretty easy. Thank you. I still have some imposter syndrome and this helped.

    @ericjorgearnezinochea9679@ericjorgearnezinochea96792 жыл бұрын
    • 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.

      @yoshiontheloose@yoshiontheloose2 жыл бұрын
    • This is my week 4 of CS and I'm alr stressing that I don't understand any of these lol

      @datcate9116@datcate91162 жыл бұрын
    • @@datcate9116 I am in my first hour of CS and I dont understand any of this

      @billr5842@billr58422 жыл бұрын
    • @@billr5842 I'm no longer in CS HAHA

      @datcate9116@datcate91162 жыл бұрын
  • The 2sum guy is my hero, the man hand writes error handling into it for no reason ❤️

    @sirwee_@sirwee_ Жыл бұрын
  • You can optimize the very first code by just doing this in python: *string = str(input("Input Your String: "))* *print(string[::-1])*

    @memorializers@memorializers Жыл бұрын
    • return input(“your string: “)[::-1] input() already returns a string, no need to turn it into a string again

      @matheustran8009@matheustran80098 ай бұрын
  • Bro the one kid that goes, “EY” when he says Java doesn’t count 😂

    @jw1ck@jw1ck2 жыл бұрын
  • Q: name 4 programming languages. Guy at 3:45 A: java (0), python (1), javascript (2), c (3), ruby (4)

    @ivandumancic2938@ivandumancic2938 Жыл бұрын
    • hehe 😂

      @squidy5369@squidy5369 Жыл бұрын
    • I am guy at 3:45, I approve hahaha

      @YouProductions1000@YouProductions1000 Жыл бұрын
  • Reverse string: lambda str: str[::-1] 2d array sum: lambda arr: np.sum(np.array(arr))

    @foolwise4703@foolwise47032 жыл бұрын
  • 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.

    @mahadmohamed2748@mahadmohamed27482 жыл бұрын
    • You might want to code your solution in APL.

      @wizardsuth@wizardsuth Жыл бұрын
  • if only the questions in the test were this simple

    @jonathangigi3163@jonathangigi31632 жыл бұрын
  • What an amazing idea. A great way to get people to think about coding. That being said, come to my town next. Haha!

    @VizXRyRy@VizXRyRy Жыл бұрын
  • solved all the questions with simple solutions feeling confident for some weird reasons becoz i am second year it student

    @thestranger8352@thestranger8352 Жыл бұрын
  • 3:37 that man just bluffed his way across with C+ as a language and still got that cash.

    @mugu007@mugu0072 жыл бұрын
  • Make sure to check out Nick's video for part 2! kzhead.info/sun/iqiuisOLlmusf58/bejne.html

    @kennygunderman@kennygunderman2 жыл бұрын
  • 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.

    @wenreloz@wenreloz Жыл бұрын
  • 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.

    @alejandromichelena66@alejandromichelena66 Жыл бұрын
    • or even better str = str[::-1]

      @LambdaSan@LambdaSan11 ай бұрын
    • @LambdaSan Bruh, that's what I was thinking. All these people defining function for a simple task.

      @solaire_of_the_east@solaire_of_the_east11 ай бұрын
  • you should zoom even for a second on the code, each time so we can have a look at it.

    @aryelpanda@aryelpanda2 жыл бұрын
  • 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.

    @Fuze_Youtube@Fuze_Youtube2 жыл бұрын
  • I should watch these for inspiration to get better, and to try and see if I can at first understand these and then be able to do them and then ultimately to be able to have this: 0:36 Amount of confidence.

    @Ellipsis115@Ellipsis115 Жыл бұрын
  • id love to see someone answer using matlab, most of these r 1 liners "doesn't matter what language" Matlab: 1. string{1}(end:-1:1) 2. sum(Arr,[],'all') 3. (bit longer) [x = array of ints, t = target] for i1 = 1:numel(x) i2 = find(x + x(i1) == t) if(i2) break end end

    @Cl0udWolf@Cl0udWolf Жыл бұрын
  • 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...

    @Random-ey7tq@Random-ey7tq2 жыл бұрын
  • Sponsored by Skillshare, Udemy getting all the PROMOTION is just hilarious. Thanks Skillshare LOL 😂

    @digitalmoustache8416@digitalmoustache84162 жыл бұрын
  • 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

    @nicreven@nicreven Жыл бұрын
    • 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.

      @bultvidxxxix9973@bultvidxxxix997311 ай бұрын
  • for the reverse string one, id just put "return inputStr[::-1]"

    @charlesreed8420@charlesreed84208 ай бұрын
  • 0:25 only programmers would notice the ==

    @ahmad.ramadan@ahmad.ramadan2 жыл бұрын
  • bro with the indian accent said i haven’t done this in a while but pulled out the optimal solution😭😭😭😭😭😭😭

    @bubble418@bubble4182 жыл бұрын
  • Passing in an array of sub arrays use arr.flat(Infinity) and then run that through a for loop -- JS.

    @anthonythompson3806@anthonythompson38062 жыл бұрын
  • This love really tell us all something.. Its inspiring i don't need to tell you guys what this video tell us, because i believe we already know

    @ravensquad7593@ravensquad7593 Жыл бұрын
  • 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.

    @sonikblade@sonikblade2 жыл бұрын
    • 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.

      @sneak9407@sneak9407 Жыл бұрын
    • @@sneak9407 I garantee you that the whiteboard would not have enough RAM for any of both approaches

      @sonikblade@sonikblade Жыл бұрын
    • @@sonikblade lmao.

      @sneak9407@sneak9407 Жыл бұрын
  • Remember y'all, of you ever get stuck on an interview question, throw a hash map at it

    @viepng@viepng Жыл бұрын
KZhead