Solve This Coding Problem and Win $200

Ғылым және технология

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 KZread channel:
kzread.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
    @godofpro57672 жыл бұрын

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

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

    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".

  • @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

  • @trash_in_a_box

    @trash_in_a_box

    Жыл бұрын

    @@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.

  • @stxnw
    @stxnw2 жыл бұрын

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

    "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.

  • @kaiacrisp
    @kaiacrisp2 жыл бұрын

    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

    2 жыл бұрын

    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 kzread.info/dash/bejne/fIRrq7aCiKrWeM4.html

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

    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

  • @NickWhite
    @NickWhite2 жыл бұрын

    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

  • @qmance8062
    @qmance80622 жыл бұрын

    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

    Жыл бұрын

    Woah for real? What helped you achieve that

  • @filyboy7

    @filyboy7

    10 ай бұрын

    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

    10 ай бұрын

    @@filyboy7I am also studying that course 😊

  • @ab.5
    @ab.52 жыл бұрын

    grandpa still remembers Fortran 💀 3:25

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

    "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

    Жыл бұрын

    🤣

  • @elephantwaffle5612
    @elephantwaffle56122 жыл бұрын

    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 KZread 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 KZread and then feeling superior enough to make fun of someone for getting a BS in computer science

  • @Rakeshyadav-ud8di
    @Rakeshyadav-ud8di2 жыл бұрын

    It's great work done by you and for those who are starting career in IT.

  • @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

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

    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_Hughes2 жыл бұрын

    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

  • @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

  • @Michael89312
    @Michael893125 ай бұрын

    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 move the right pointer to the left and if 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.

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

    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

    11 ай бұрын

    ​@@KillOnSbut what about ++C and --C?

  • @sketchturner6669
    @sketchturner66692 жыл бұрын

    5:35 my nigga even doin the exception handling

  • @heat-rp1gm
    @heat-rp1gm2 жыл бұрын

    Amazing video as usual, keep up the fantastic content, your videos always make my day, thanks, I love the positive vibes, keep it up !!!

  • @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

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

    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

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

    Make sure to check out Nick's video for part 2! kzread.info/dash/bejne/iXipvMGMj5zcfMo.html

  • @JG-le4n
    @JG-le4n Жыл бұрын

    Respect to everyone who tried and solved it

  • @biniteshome1403
    @biniteshome14032 жыл бұрын

    i like the dude who added error handling, catching errors so they don't hit the ground. epic

  • @arpanghoshal2579
    @arpanghoshal25792 жыл бұрын

    2:06 Does it matter what language? Nah *Processed to write machine code in 0s and 1s*

  • @Sad-Lemon
    @Sad-Lemon2 жыл бұрын

    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

    11 ай бұрын

    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

    11 ай бұрын

    @@MyAmazingUsername shut up. You're just rehashing what I said with a positive spin.

  • @hanac5586
    @hanac5586 Жыл бұрын

    You met such nice people, wholesome

  • @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

  • @ahmadmohamad8416
    @ahmadmohamad84162 жыл бұрын

    2:20 hey heeeeeeeeeey lmao

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

    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

    4 ай бұрын

    skillshare is a scam beware search the topic in yt u'd know btw i teach python and c too in hindi.

  • @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.

  • @DNGR369
    @DNGR369 Жыл бұрын

    Thanks for creating problems to solve and saving a Street Programmer out in the wild.

  • @KhainiSader
    @KhainiSader2 жыл бұрын

    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...

  • @djaberomarkahlouche6342
    @djaberomarkahlouche63422 жыл бұрын

    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".

  • @luckyambitiousnthani2848
    @luckyambitiousnthani28482 жыл бұрын

    Keep this kind of videos coming man. Very inspiring

  • @bradleyhastings2422
    @bradleyhastings24222 жыл бұрын

    The two sum could be done iterating 0

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

    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.

  • @GraphicalBoss
    @GraphicalBoss2 жыл бұрын

    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.

  • @dave_thebrave
    @dave_thebrave Жыл бұрын

    so glad to know! you're going to explain things to me, and appreciate the

  • @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!)

  • @supriyosarkar5132
    @supriyosarkar51322 жыл бұрын

    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.

  • @ayubhaji2441
    @ayubhaji24412 жыл бұрын

    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.😁

  • @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.

  • @charlesreed8420
    @charlesreed84209 ай бұрын

    for the reverse string one, id just put "return inputStr[::-1]"

  • @FrontEnded
    @FrontEnded2 жыл бұрын

    27 years old nd just started to code, i love it btw

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

    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

  • @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

  • @MyAmazingUsername
    @MyAmazingUsername11 ай бұрын

    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

    10 ай бұрын

    Honestly, he overcomplicated that. He had the right idea but then went rogue with the syntax and that code is definitely not maintainable. lol

  • @DeepakKumar-xr3oh
    @DeepakKumar-xr3oh2 жыл бұрын

    This is something that should be encouraged more. Why would someone dislike this video is beyond my comprehension.

  • @user-uo5id1dd5s
    @user-uo5id1dd5s2 жыл бұрын

    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

  • @sirwee_
    @sirwee_ Жыл бұрын

    The 2sum guy is my hero, the man hand writes error handling into it for no reason ❤️

  • @Shay001
    @Shay001 Жыл бұрын

    “when will we need this in life” This. This is when you need it.

  • @dj_b1627
    @dj_b16272 жыл бұрын

    That was insanely entertaining and funny. Please do this again.

  • @K_CO_GurvinderSingh
    @K_CO_GurvinderSingh2 жыл бұрын

    hard part is the complexity or constraints on input data . Thats what makes u apply mathematics

  • @anthonythompson3806
    @anthonythompson38062 жыл бұрын

    Passing in an array of sub arrays use arr.flat(Infinity) and then run that through a for loop -- JS.

  • @foolwise4703
    @foolwise47032 жыл бұрын

    Reverse string: lambda str: str[::-1] 2d array sum: lambda arr: np.sum(np.array(arr))

  • @cringe2474
    @cringe24742 жыл бұрын

    Cool! Make more of these type of videos!

  • @jonathangigi3163
    @jonathangigi31632 жыл бұрын

    if only the questions in the test were this simple

  • @edison2964
    @edison29642 жыл бұрын

    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

  • @iamdopeasfcuk
    @iamdopeasfcuk Жыл бұрын

    i wish i was there when this guy was doing this. these are some easy ass questions

  • @Rocco7070
    @Rocco70702 жыл бұрын

    awesome video, I want more programming on the street

  • @teeraucher
    @teeraucher2 жыл бұрын

    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

    2 жыл бұрын

    Time pressure 🥲

  • @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.

  • @Random-ey7tq
    @Random-ey7tq2 жыл бұрын

    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...

  • @anvithkakkera7196
    @anvithkakkera71962 жыл бұрын

    wow, u went from 30k to almost 80k subs! amazing, didn't realize how much ur channel grew recently

  • @Skatinima
    @Skatinima2 жыл бұрын

    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?

  • @thestranger8352
    @thestranger8352 Жыл бұрын

    solved all the questions with simple solutions feeling confident for some weird reasons becoz i am second year it student

  • @alainirebegashumba4862
    @alainirebegashumba486210 ай бұрын

    This is great I like. This inspired me to continue with my passions.

  • @mugu007
    @mugu0072 жыл бұрын

    3:37 that man just bluffed his way across with C+ as a language and still got that cash.

  • @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 :))

  • @anar-k-jafarov
    @anar-k-jafarov9 ай бұрын

    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)

  • @MrNsaysHi
    @MrNsaysHi2 жыл бұрын

    competitive programmers: “are you insulating our traditions?”

  • @jw1ck
    @jw1ck2 жыл бұрын

    Bro the one kid that goes, “EY” when he says Java doesn’t count 😂

  • @abdelhakimlamnaouar9527
    @abdelhakimlamnaouar95276 ай бұрын

    In the last problem, he can just sort the array and use two pointers one at the beginning and one at the end if the sum of these two values is greater than the target sum endpointer-- else if it's less than the target sum, beginningpointer++ else return the two values

  • @aryelpanda
    @aryelpanda2 жыл бұрын

    you should zoom even for a second on the code, each time so we can have a look at it.

  • @ahmad.ramadan
    @ahmad.ramadan2 жыл бұрын

    0:25 only programmers would notice the ==

  • @Webberjo
    @Webberjo6 ай бұрын

    I would've done that last one using using two for loops. Not elegant, but effective.

  • @thebicycleman8062
    @thebicycleman80629 ай бұрын

    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!

  • @PinoyDiskubreChannel
    @PinoyDiskubreChannel2 жыл бұрын

    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 KZread!!!!

  • @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.

  • @ericjorgearnezinochea9679
    @ericjorgearnezinochea96792 жыл бұрын

    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

  • @Taterzz
    @Taterzz Жыл бұрын

    if there's anything i learned from my astronomy degree, it's that everything can be solved with for loops.

  • @micknamens8659
    @micknamens86592 жыл бұрын

    -- 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]]

  • @kyuss789
    @kyuss7892 жыл бұрын

    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.

  • @sonikblade
    @sonikblade2 жыл бұрын

    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.

  • @flew6176
    @flew6176 Жыл бұрын

    for the first exercices just need to write : string[::-1]

  • @yueruan1672
    @yueruan16722 жыл бұрын

    What camera are you using for the end segment 6:30 . The video quality is awesome

  • @digitalmoustache8416
    @digitalmoustache84162 жыл бұрын

    Sponsored by Skillshare, Udemy getting all the PROMOTION is just hilarious. Thanks Skillshare LOL 😂

  • @Fuze_Youtube
    @Fuze_Youtube2 жыл бұрын

    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.

  • @abhishankpaul
    @abhishankpaul10 ай бұрын

    The old man in the bonus round was an OG

  • @gamingwithgeko7377
    @gamingwithgeko7377 Жыл бұрын

    As a wanna be programmer it would be nice to see a still shot of the problem and solution.

  • @patrickgambill9326
    @patrickgambill93262 жыл бұрын

    The $200 guy had a way more clever solution than I would have

  • @kennygunderman

    @kennygunderman

    2 жыл бұрын

    Same it kinda threw me off tbh

  • @Kabeer2004
    @Kabeer20042 жыл бұрын

    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.

  • @bloeffmaximus6937
    @bloeffmaximus6937 Жыл бұрын

    i subbed since this was fun as a geek to watch

  • @bubble418
    @bubble4182 жыл бұрын

    bro with the indian accent said i haven’t done this in a while but pulled out the optimal solution😭😭😭😭😭😭😭

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

    Remember y'all, of you ever get stuck on an interview question, throw a hash map at it

  • @ego-lay_atman-bay
    @ego-lay_atman-bay2 жыл бұрын

    Wow, the easy challenges I could do super quickly.

Келесі