Problem Solving Technique #1 for Coding Interviews with Google, Amazon, Microsoft, Facebook, etc.

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 231

  • @CSDojo
    @CSDojo  Před 6 lety +74

    Thanks so much for watching this video, everyone!
    If you liked this video, I would also recommend my Udemy course, "11 Essential Coding Interview Questions": www.udemy.com/11-essential-coding-interview-questions/?couponCode=SOLVE2
    (You'll get a discount through the link above :)

    • @alandala1599
      @alandala1599 Před 6 lety +2

      CS Dojo I think you make enough money at Google to afford to give that course for free though ;)

    • @aaronrenfroe5199
      @aaronrenfroe5199 Před 6 lety

      He left his job at google to do this.

    • @oscarcastanedamunoz
      @oscarcastanedamunoz Před 6 lety

      Hey have you tried his course? is it good?

    • @oscarcastanedamunoz
      @oscarcastanedamunoz Před 6 lety

      Google is gonna be phone screening me in a couple of weeks and im wondering if its any good.

    • @oscarcastanedamunoz
      @oscarcastanedamunoz Před 6 lety

      Its not that I don't wanna buy the course. it's just that I'm wondering if its worth spending time on it. So I don't waist valuable studying time.

  • @alessandrocerruti2927
    @alessandrocerruti2927 Před 5 lety +16

    Randomly stumbled on this video. Gotta love that he underlines these interviews are NOT about code, puts no snippet in the video and still people write random code thinking they know better while they don't.
    Amazing.

  • @RaviRatheeishere
    @RaviRatheeishere Před 6 lety +378

    He wasted a paper

    • @sampro454
      @sampro454 Před 6 lety +21

      rip the amazon rain-forest 2017

    • @pranupranav5563
      @pranupranav5563 Před 6 lety +3

      All rathes are one and the same they are shitts may be....Dhruv rathe is also shitty like you

    • @Aker
      @Aker Před 5 lety +1

      Pranav Shastri that paper was already wasted

    • @shutdahellup69420
      @shutdahellup69420 Před 5 lety +1

      ikr? #TreeLivesMatter

    • @vibsh625
      @vibsh625 Před 5 lety +2

      @@pranupranav5563 I think he was joking, dude. Don't hate. (From a rathee)

  • @107madhu
    @107madhu Před 5 lety +30

    You should be a professor at a college bro. Really making a change.

    • @lukkash
      @lukkash Před 4 lety +1

      Madhu, you've just given him a great advice for an additional career path :) and your comment should be awarded with a heart

  • @programmer6761
    @programmer6761 Před 6 lety +2

    Holy shit I am studying 8th grade and still got a solution!
    Code(in python)
    def multiply_to_20(list):
    for num in list:
    if 20/num in list:
    return num,20/num

  • @Pakrdjdjdnsnsmskzozovyff
    @Pakrdjdjdnsnsmskzozovyff Před 7 lety +66

    you have good approach for explaining things

  • @dashankbhoir9934
    @dashankbhoir9934 Před 4 lety +2

    Sort the array and use two pointer technique

  • @harshsharma523
    @harshsharma523 Před 6 lety +8

    Hello Cs Dojo, i am one of your big fan, i love the way you teach these concepts, i really want you to make a series of data structures problems ( if possible with JavaScript, that would be amazing )
    Thanks and Regards ❤

  • @arttadeos3347
    @arttadeos3347 Před 5 lety +4

    Alternate: determine the factors or values involving 20 ... 20 = 20&10&5&4&2&1. Note: Scan if the elements contains negative values, in which the product of two factors of 20 can be applied.

  • @vijayrao10
    @vijayrao10 Před 6 lety +3

    explaing each algorithm with time complexity O(n),O(n2),log(n),nlogn

  • @TMarco1997
    @TMarco1997 Před 6 lety +19

    I like your videos :)
    I've been programming for 7 years now but I like the style you explain things.
    One more thought on this problem though;
    why not get all the divisors of the number you want to get and then checking the set of given integers if it contains the required ones.
    I think your solution is O(nlogn) and this approach would yield O(n).
    What do you think?
    greetz from Germany

    • @dafemartdafemart4020
      @dafemartdafemart4020 Před 6 lety +1

      how would you find all the divisors of a number?. That's a tough task.

    • @TMarco1997
      @TMarco1997 Před 6 lety +3

      given the number n you can for-i-loop until n/2 and check if n%i == 0 => those are all possible divisors and the time it takes is n/2

    • @MargaretSpintz
      @MargaretSpintz Před 6 lety +3

      that's a different 'n' to the size of array 'n'

    • @irvinge4641
      @irvinge4641 Před 6 lety +1

      oh yours would be O(K) right? if K goes to 1000 and theres only 3 elements in the array n = 3, the complexity would take longer

    • @prateek2974
      @prateek2974 Před 6 lety

      He is suggesting use of hash table... O(n), O(n)

  • @Traoreee
    @Traoreee Před 7 lety +15

    Great video to see how to approach the problems...

    • @CSDojo
      @CSDojo  Před 7 lety +5

      Thank you! Please let me know if there are any other types of videos you'd like to see in the future :)

    • @Traoreee
      @Traoreee Před 7 lety +4

      more&more&more algorithm videoossss pleasee!!!! (The algorithms that facebook microsoft amazon etc asks)
      I don't know which language do u write but i actually wanna see something like this -> 1- a problem 2- an approach to solve the problem. 3- code writing part 4- and make code simplier. Because it's not easy to write the best code when solving the problem. And if we want to work in big companies we have to write simple&understandable codes. You might help us about writing a simple code/think.

    • @codestorywithMIK
      @codestorywithMIK Před 7 lety +2

      CS Dojo More and more algorithm based questions.

  • @mrProgrammingGeek
    @mrProgrammingGeek Před 6 lety +25

    Steps to do this:
    1> First sort the array
    2> Then have two pointers, the first pointing to the first elem(front) and the second pointing to the last one(back)
    3> Multiply the two values that the pointer pointing to:
    If the multiplication of the two numbers is less than 20, then move the front pointer
    If the multiplication of the two numbers is more than 20, then move the back pointer
    If the multiplication is 20, then you a match
    The algorithm's complexity is O(n logn) + O(n) < O(n^2)

    • @dominikkowalczyk6484
      @dominikkowalczyk6484 Před 6 lety +14

      sunny grewal you can do it in O(n) :P

    • @randomnessunite
      @randomnessunite Před 6 lety +18

      This will not always work, as their can be negative factors.
      Say you have the string:
      (-4, -5, 4, 10)
      The obvious answer here is -4*-5=20
      Your answer would do as follows:
      Sort the list:
      (-5, -4, 4, 10)
      -5*10=-50
      -50

    • @DemonLilyYT
      @DemonLilyYT Před 6 lety +2

      But his approach is O(n) making the sorting basically inefficent. But if he would not use hashmap and would have a O(n^2) approach, this would be good, yeah.

    • @ramavinay1977
      @ramavinay1977 Před 6 lety

      what o and n refers to.

    • @kglayyet
      @kglayyet Před 6 lety

      you can use set with O(n)

  • @raj.iitr005
    @raj.iitr005 Před 6 lety +4

    Take first Number and search for another in the remaining array using binary search, repeat this until we find a pair. Hence only nlogn complexity.

    • @DemonLilyYT
      @DemonLilyYT Před 6 lety +1

      He found a solution O(n) thought^^

    • @raj.iitr005
      @raj.iitr005 Před 6 lety

      BugRushMedia yes thanks for pointing out. But that’s using extra space!

    • @DemonLilyYT
      @DemonLilyYT Před 6 lety +1

      Raj Chaudhary yeah sure, but mostly we are interested in time complexity

    • @raj.iitr005
      @raj.iitr005 Před 6 lety

      Yes you are right, I agree with you!

    • @WilkyGandyJeanLouis
      @WilkyGandyJeanLouis Před 5 lety

      The array may be not sorted before, so doing the sorting adds some complexity to your algorithm too

  • @anshumansingh2553
    @anshumansingh2553 Před 5 lety

    For x,y in enumerate z
    If x*y double equals to 20:
    Print(x)
    Print(y)
    #z is the list that contains the numbers

  • @bielzinhoferreira8184
    @bielzinhoferreira8184 Před 6 lety +13

    He speaks english so well.Amazing content.

  • @dafemartdafemart4020
    @dafemartdafemart4020 Před 6 lety +1

    what's the complexity of your way? Assuming the worst case ex: [2 12 48 24] multiply to 48. If you use a hash table to store the numbers that you have seen you would do something like 2 -> 2, 12 ->12 and 48 - > 48. If you hash a number and nothing is found in the hash table, it means that the desired factor is not on the paper, so the question is what's the complexity of a lookup in a hash table?. I googled this up and the complexity is O(n) in the worst case, so it would be O(n^2) which is the same thing as checking every possible pair.

    • @alemiralles8961
      @alemiralles8961 Před 6 lety

      That surprise me, too. I think he didn't thought about data structures at all. He just throw a few names and that was it.
      Why would you use a dictionary (or a hash table) when you don't care about key and values?
      A hash set? maybe... if values were unique, but is hard to tell without context...

    • @irvinge4641
      @irvinge4641 Před 6 lety

      hmm yes worst case but i believe it is O(1) average case assuming the hash function does its job

    • @alemiralles8961
      @alemiralles8961 Před 6 lety

      Sure, but even taking Big O out of the table, is still confusing (from the code perspective) seeing key values when plain values would do it.

    • @noogler7949
      @noogler7949 Před 6 lety

      we can do this problem more optimally if i dont generalise it.since we already know the factors of 20 i can just apply binary search for each factor.for example first i find if 20 is there,if it is there then i search for 1.else if 20 is not there i check -20, and then -1.then check other factors like this way. time complexity would be o(logn *6) which is equal to o(logn).isnt this better???

    • @DemonLilyYT
      @DemonLilyYT Před 6 lety +3

      There is a prove out there, that you can theoretically find integer in hastable in O(1). Worst case is O(n), yeah, but you could use O(1) for the average Case, which makes it linear instead of quadratic.

  • @timcesar1
    @timcesar1 Před 6 lety

    I like the manner you teach others, I think you to have a lot of potentials I encourage you to continue and publish more stuff in udemy and here, blessings

  • @himanshmulchandani5075
    @himanshmulchandani5075 Před 6 lety +1

    Sort the array. Divide the number by the ith element of the array. Binary search the factor. Complexity would be O(nlogn). Correct?

    • @thomas.leitner
      @thomas.leitner Před 5 lety

      Well, if you ever had to implement all the sorting algorithms yourself you would know that sorting alone has an even worse complexity than just: Iterating through each value and if 20%array[i] == 0 then look up (20/array[i]) within array[i+1..n]

  • @muhammadtahirnaqashkhan8002

    It can be done by
    for loop
    for(int i=0 :i< arraysize ; i++)
    { for (int j=0; i< arraysize ; i++)
    { if((arr[i] * arr[j])==20)
    cout

  • @Guinhulol
    @Guinhulol Před 6 lety +10

    Like your approach, I acutely enjoyed it.

  • @B-Billy
    @B-Billy Před 6 lety +1

    Thanks.. It's really awesome the a non-CS guy teaching CS :D

  • @isharaperera419
    @isharaperera419 Před 4 lety

    Really kind of you to share those stuff. Thank you very much, Dojo❤

  • @manoharlakshmana6171
    @manoharlakshmana6171 Před 6 lety +1

    CS DOJO : Add a coding problem of combination of dynamic programming and binary tree or trees... That would be great !

  • @fanikarthik5422
    @fanikarthik5422 Před 6 lety

    import math
    s=set()
    a=set([2,4,1,6,5,40,-1])
    for i in range(1,(int(math.sqrt(20))+1)):
    if 20%i==0:
    s.add(i)
    s.add(int(20/i))
    cs=s.intersection(a)
    for i in cs:
    if 20%i==0:
    n=int(20/i)
    if n in cs:
    break
    print(i,n)

  • @abhishekbanerjee3214
    @abhishekbanerjee3214 Před 6 lety

    Hi YK... your way of explaining is really simple and easy to understand. Can you start Datastructures and algorithm course. Would be of great help

  • @physlift9175
    @physlift9175 Před 4 lety

    20/X = Y where X is one of the numbers in the list then check if Y is also in the list

  • @b-mixchannel6735
    @b-mixchannel6735 Před 5 lety

    You cant skip the coding if thats required by the interviewer. You can explain as you did but then you have to implement the code for it as well.

  • @priyanshuupadhyay4854
    @priyanshuupadhyay4854 Před 5 lety +5

    should i need a laptop for learning coding or i can continue with my pc one and what kind of specs would you recomend me please reply

    • @KrushKingdom
      @KrushKingdom Před 5 lety +1

      You don't need a powerful computer to program because what you'll be coding at first probably won't be that be that resource- intensive. But the most important thing would be the run-time for whatever you're actually writing. So if you write a resource-intensive program, that would usually be due to the program itself, not the environment's. The integrated development environments (IDE's) aren't that heavy but text-editors can run on anything.

  • @CardinalHijack
    @CardinalHijack Před 4 lety

    Does the role you are doing at google depend on how often you need to solve these types of problems? For example ,would a "web solutions engineer" have to do this much algorithm based work VS a "usual" backend software engineer?
    I am a web engineer and have never needed to problem solve in this kind of way - the problem solving is more about putting things together (webpack, babel, front end frameworks, testing frameworks, middleware things like cloud functions, UI components etc) and less algorithmic problem solving (which as mentioned I've never had to do in 4 years of experience).

  • @rajeshwarisarakam7288
    @rajeshwarisarakam7288 Před 3 lety

    Dude I like ur videos a lot. It's more than enough for python. Btw why did u stop you should have continued. Make a university on ur own. I bet that u will get a lot number of students

  • @aerivera
    @aerivera Před 6 lety +1

    1:24 At this point I knew how to approach the problem, however, this is the sad bit, I cannot remember the name of the algorithm that I needed to implement, so I'd Google the answer, but it sad because this is basic CS fundamental concepts and I cannot remember my stuff... I need to practice more lol.
    Great video.

    • @GeronimoLTondato
      @GeronimoLTondato Před 4 lety

      Mmmm at the point you describe, to implement the naive solution you don't need any particular named algorithm ( as far as I am aware), just two for nested loops. Hope you have made progress in this period of time, it's just a matter of practice.

  • @CodeProps
    @CodeProps Před 5 lety

    Tutorial channels don't grow this fast, kudos bro!! approaching 1 M already

  • @satyamkumarthakur5804
    @satyamkumarthakur5804 Před 6 lety

    Please make a video on what topics and how should I prepare to crack all the rounds of google interview....

  • @a.a7907
    @a.a7907 Před 6 lety +4

    The paper he mentioned is similar to cache

  • @MeLeRyZ
    @MeLeRyZ Před 6 lety

    for me, it's better to take 20 and after that divide it by every single element in array. then, look into array - does it has the result of dividing :)

    • @researchandbuild1751
      @researchandbuild1751 Před 6 lety

      MiM MeLeRy sounds like a good possible way. Divide by 20 and check for remainder

  • @studylifetuition
    @studylifetuition Před 6 lety

    So very important. I need more vedios... Thank you.
    Love from India.

  • @3722gopi
    @3722gopi Před 6 lety +1

    that is so good... you explained very well

  • @josejulian5033
    @josejulian5033 Před 4 lety +2

    You can also solve that problem with a linear complexity by using only an array

    • @CloudXpat
      @CloudXpat Před 4 lety

      We are thinking in the same direction

  • @HaikelFazzanii
    @HaikelFazzanii Před 7 lety

    Thanks for the video , thanks for sharing your experience, we need more videos about Algorithms & logic ..

  • @zeus1082
    @zeus1082 Před 6 lety +1

    For x in lists:
    for y in lists:
    If(x*y==20):
    print(x,y)
    I got the output.Is this optimal one??

    • @Vancha112
      @Vancha112 Před 6 lety +1

      In this case you check all elements in the list in the second loop, for every 1 iteration in the first loop. As mentioned it would be more efficient to do one loop, and add every number you encounter to a seperate array. If the current number in the first array equals twenty when multiplied by another number in the array you created, you only have to loop over the numbers you already encountered, so there are less steps every iteration.

  • @lemeow7885
    @lemeow7885 Před 6 lety

    Wouldn't it be faster to sort and binary search for tuples? E.g. (2 10) (5 4) ... You could even filter out non divisors while you sort

  • @dasammoorhai3197
    @dasammoorhai3197 Před 6 lety +1

    i learn programing in highschool and your videos and tips really help me. thank you.

  • @noogler7949
    @noogler7949 Před 6 lety

    we can do this problem more optimally if i dont generalise it.since we already know the factors of 20 i can just apply binary search for each factor.for example first i find if 20 is there,if it is there then i search for 1.else if 20 is not there i check -20, and then -1.then check other factors like this way. time complexity would be o(logn *6) which is equal to o(logn).isnt this better???

  • @leob.6534
    @leob.6534 Před 6 lety +1

    Would a HashMap give you guaranteed O(n) complexity, or "on average" O(n) complexity?

  • @TalymoMakes
    @TalymoMakes Před 3 lety

    Fantastic explanation.

  • @desikitchenstories
    @desikitchenstories Před 3 lety

    Which data structure would you prefer in this example if the array size is small like 5 maybe?

  • @SGDominicana
    @SGDominicana Před 6 lety +15

    no need for HashMap, use HashSet

    • @tejasvinigowda1891
      @tejasvinigowda1891 Před 4 lety

      How sir.. Can u explain me

    • @harshithravinoothala6944
      @harshithravinoothala6944 Před 4 lety

      Dude if there are same numbers then we have to increase the count of repeating numbers. So hash map is used instead of hash set

    • @SubiyaCryolite
      @SubiyaCryolite Před 4 lety

      In Java, a HashSet uses a HashMap as a backing type anyway.

  • @segfaultbuthopeful
    @segfaultbuthopeful Před 6 lety

    I might find a solution which is O(n).
    1- Initialize 2 dictionary. Saying first,second.
    2- Start iterating the array.
    3- Check number if it is in the second dictionary as a key. If not add it to first dictionary with zero value. Divide it by 20 and add result to the second dictionary with value the number that we first encountered.
    4- Repeat 3. If number found in the second dictionary, voila ! You found a solution. Second dictionary, key-value.
    time complexity: O(n)
    Memory: O(2n) (I guess ???)

  • @Sgoose105
    @Sgoose105 Před 5 lety +1

    What if the result is at the end of the array, your approach won’t work as expected.

    • @VikasPoonia
      @VikasPoonia Před 5 lety

      It is Big O(n) always. They are special cases. And there is no way to know if solution is going to be at the end of the array.

  • @HelloWorld-sy4yc
    @HelloWorld-sy4yc Před 4 lety

    Of course the following solution not better, however, we can receive solution for the O(n * log n). Okay. We have some target value and we need to find two index of severals numbers in this sequence which multiply is equals to target. We can check each numbers in this sequence and for the each number we can find other number which multiply equals to targer with binary search. Frankly we have the following stuff: a[i] * a[j] = target => a[j] = target / a[i].

  • @zakriataleb6555
    @zakriataleb6555 Před 4 lety

    thank you, would you pls advise some website for practicing and developing problem solving skills?

  • @Nate-xv4bc
    @Nate-xv4bc Před 6 lety +10

    Why use a hash table?

    • @Xellos976
      @Xellos976 Před 6 lety +6

      Jason E. because with a hash table you can check to see if the element is present in constant time. with an array, you'd have to search the list which would take logarithmic time on average at best. basically with a hash table you can see if a number is present relatively instantly

    • @Nate-xv4bc
      @Nate-xv4bc Před 6 lety +2

      Xellos976 cool , I am going to start using them more often now!

    • @ningdi6545
      @ningdi6545 Před 6 lety

      Actually, Java I use hashset... never heard hash table before

    • @mohitmalviya17
      @mohitmalviya17 Před 6 lety

      Ning hash table was there in Java like HashMap. But it was Synchronised

    • @YSSP4
      @YSSP4 Před 6 lety

      In this case hashset is good instead of hashtable. because you are going to deal with just a key(or say a single data) in each point and also it avoids duplicates.

  • @parvezrafisparta
    @parvezrafisparta Před 6 lety

    Really helped the way of approach!!!

  • @yashvarshney6761
    @yashvarshney6761 Před 4 lety

    We can use 2 pointer technique.

  • @RodrigoCoutinho
    @RodrigoCoutinho Před 6 lety

    Cool very nice... use array.sort() to order array before..

  • @adnanenful
    @adnanenful Před 6 lety

    ok, is it just me or is the 1st problem is misleading? when i first read it, i thought find multipliers of 20 like 40,80... not find a combination of two numbers, which if you multiplied them the result would be 20.

  • @growwithanshuman
    @growwithanshuman Před 6 lety

    Hey could we do that take the first number from the array and multiply it with rest elements if it's 20 than save that number else take other number(either the second one?

  • @OneWayReality
    @OneWayReality Před 5 lety

    Hello, i am new at coding but i have theory knowledge so can i practice coding on LeetCode?
    Your advise would be helpful for me.

  • @abdelsalammostafa3426
    @abdelsalammostafa3426 Před 2 lety

    do you heard about the 2 pointers technique ?
    it will be much better and O(N)

  • @ASarcasticHuman
    @ASarcasticHuman Před 5 lety

    @CS Dojo
    hi, whats the reason for using hash table for maintaining already read values given in 2nd explanation because anyways we will have to read those values every time until we get desired output.
    I'm beginner in programming & after watching the solution, i had a question about space complexity.
    Thanks in advance

    • @prajaktarodrigues7104
      @prajaktarodrigues7104 Před 5 lety

      Hash table with a good hash function has the retrieval time of O(1). So, you can easily check if the value exists in the table in constant time.

  • @rajanandj1177
    @rajanandj1177 Před 6 lety

    Hi cs dojo and iam from India and here to ask a question on my career.i was just 14 years old boy and have a lot of interest in robotics . So I need your suggestions to start my first advanced coding and what can I do in my future

  • @DxDevil1010
    @DxDevil1010 Před 5 lety

    Hi guys...For this kind of question, is it proper to use this method?(Just for self-learning...write in JAVA)
    1. 20 divided by every elements of that array, for example, 20/array[0] = 10, 20/array[1] = 5, etc
    2. Then try to match the divided number in that array
    3. If it can be found, then print our that pair of 2 numbers
    (Use nested for loop for the matching just need a few line of codes...is it legal?)
    THX !!!

    • @thomas.leitner
      @thomas.leitner Před 5 lety

      Yep you are already better off by NOT including much more complexity by using a sorting algorithm, like I see in other comments. And I had to implement several sorting algorithms including calculation of complexity.
      Yep you do what I would do: Iterating through each value and if 20%array[i] == 0 then look up (20/array[i]) within array[i+1..n]

  • @kalkvand
    @kalkvand Před 6 lety

    Well, wouldn't i just be able to ex. in C++ sort the array and do a Binary Search?

  • @karthiksk7246
    @karthiksk7246 Před 6 lety

    Awesome bro...
    Keep continuing....

  • @kowsikowsi238
    @kowsikowsi238 Před 6 lety

    Iam a bio chemistry student i dont know why Iam watching but I will say that this small guy is smart

  • @RaviPrakash-tc5nw
    @RaviPrakash-tc5nw Před 6 lety

    Please!!! Make a video on statistics

  • @Chandler890
    @Chandler890 Před 6 lety +1

    Filter out neg, and num over 20. Perform sort alg on array, get lcm

    • @guitar45rocks5
      @guitar45rocks5 Před 6 lety

      What if you've got -4 and -5?

    • @Chandler890
      @Chandler890 Před 6 lety

      Allopat true, overlook that one. Now to come to think of it, I don't think is necessary to sort the array. It would only increase time complexity. So look for + pair lcm & - pair lcm

    • @guitar45rocks5
      @guitar45rocks5 Před 6 lety

      Yeah I did something similar. It reminded me of another interview problem that had a similar solution - not sure where I found it, though.

    • @tyrellwreleck4226
      @tyrellwreleck4226 Před 6 lety

      does it matter if you have negative numbers? they are still integers right? sorry, i just notice you still having more attention dealing with negative numbers than irrational numbers. I just don't see your point.

  • @TheKyloRylo
    @TheKyloRylo Před 6 lety

    Am i dumb or could you just set a loop with the condition of 2 numbers multiplied together to make 20 and then just write the algorithm were it will just multiply every number together until the condition is satisfied?

    • @lxjuani
      @lxjuani Před 6 lety

      The KyloRylo multiplying every combination of numbers would be expensive. it's much better just to take the original number, know what you'd need to multiply to 20 and compare to that number

  • @exkorbuto1
    @exkorbuto1 Před 7 lety +18

    he is so young.

    • @brianlewis2956
      @brianlewis2956 Před 6 lety +1

      he's just a midget. =P

    • @robbieh6182
      @robbieh6182 Před 6 lety +3

      javier mila ?? He looks like he is in his mid twenties

    • @gogetadexter
      @gogetadexter Před 6 lety +13

      Life is all about realizing that there is a younger Asian kid whose way better than you :P

  • @dennisalexander5468
    @dennisalexander5468 Před 4 lety

    But how if you getting stuck in the middle of programming? I mean, you've already thinking about the solution on paper but it's not implemented on code yet

  • @sanjaypriyadharshan8237

    To become software engineer which kind degree need.CSE or IT

  • @glassconference9088
    @glassconference9088 Před 6 lety

    I suck at math and I wanted to ask if Math isss Like Everywhere like needed all the time in programming

  • @straighter100
    @straighter100 Před 6 lety

    why not just calculate 20%n where n is number in array and if answer is zero, push it into seperate array, then iterate through array and if another number gives zero, multiply it by all values in seperate array and see if result is20

  • @RagHelen
    @RagHelen Před 6 lety

    Your paper solution is hash table drills written on paper :)

  • @mahnazsaebi8132
    @mahnazsaebi8132 Před 2 lety

    You are amazing!

  • @issacjohn4900
    @issacjohn4900 Před 5 lety +1

    Thank man I need that! :)

  • @mohamedbenkradidja5359

    hello , i would like to ask if these companies like amazon and google recruite only candidates who studied computer science and have the certification or if you are not a computer science student but you do have expérience in coding and using pyhton for example

  • @All_rounder19875
    @All_rounder19875 Před 5 lety

    it helped me a lot thanks

  • @JanacMeena
    @JanacMeena Před 4 lety

    Tip #1 - Think on paper, consider multiple solutions and feel confident about the solution before writing cod

  • @alimedani0296
    @alimedani0296 Před 3 lety

    Thank you so much sir

  • @BeyondBoundrez
    @BeyondBoundrez Před 6 lety

    Can you please make some teaching video on software engineer

  • @cgzegarra
    @cgzegarra Před 6 lety

    Thanks a lot! Nice Video!

  • @anzo.p
    @anzo.p Před 5 lety

    replace paper with your editor and it maybe is a good thing to actually do literally

  • @georgetannous5162
    @georgetannous5162 Před 5 lety

    dude but you can't use hash table with negative numbers, can you?

  • @manashranjan1267
    @manashranjan1267 Před 6 lety

    Nice explanation bro

  • @kevinphilipsanders
    @kevinphilipsanders Před 6 lety

    The Evolution of a Programmer
    School:
    10 PRINT "HELLO WORLD"
    20 END
    College:
    (defun hello
    (print
    (cons 'Hello (list 'World))))
    Professional (CS Dojo):
    #include
    void main(void)
    { char *message[] = {"Hello ", "World"};
    int i;
    for(i = 0; i < 2; ++i)
    printf("%s", message[i]);
    printf("
    "); }
    Guru:
    10 PRINT "HELLO WORLD"
    20 END

  • @worldoftanksblitz7599
    @worldoftanksblitz7599 Před 6 lety +2

    How long have you been coding . I am 14 and I only know JavaScript, CSS and HTML :(

  • @paintwithvimal
    @paintwithvimal Před 5 lety

    How to apply for Google jobs ?

  • @kyledrewes6552
    @kyledrewes6552 Před 5 lety

    Can someone please show me how to do this problem on c++? Thank you

  • @boxingexpert9065
    @boxingexpert9065 Před 6 lety

    Great video.

  • @Oplaflafla
    @Oplaflafla Před 6 lety

    Hello, CS DOJO can u please tell me if this is a good way to solve it? i dont know if it's inefficient or something because im not using hash tables.
    public string EncuentraMultiplos(int [] arreglo,int numFind,int start)
    {
    while (start < arreglo.Length)
    {
    for (int i = 0; i < arreglo.Length; i++)
    {
    if (arreglo[start] * arreglo[i] == numFind)
    return "encontrado";
    }
    return EncuentraMultiplos(arreglo,numFind,start+1);
    }
    return "no encontrado";
    }

    • @FeroChau
      @FeroChau Před 6 lety +2

      Your algorithm takes O(n^2) which is too slow for this case.
      With hash table, you can achieve O(n).

    • @Oplaflafla
      @Oplaflafla Před 6 lety

      thx

    • @thomas.leitner
      @thomas.leitner Před 5 lety

      Well how about just iterating through each value and only if 20%array[i] == 0 then look up (20/array[i]) within array[i+1..n].
      Even hashing is more complex than necessary.

    • @thomas.leitner
      @thomas.leitner Před 5 lety

      @@FeroChau Well, then you have to consider the internal complexity of copying and hashing the data from the array into a hashtable as well.

  • @V9V5
    @V9V5 Před 6 lety

    I like when he say problem

  • @codestorywithMIK
    @codestorywithMIK Před 7 lety +1

    Will you upload more videos on this series ??????????? PLEASE LET ME KNOW

    • @CSDojo
      @CSDojo  Před 7 lety

      Yes, more videos coming up. Any particular topic you want to see?

    • @fahimchowdhury4477
      @fahimchowdhury4477 Před 6 lety

      Data Structure basics, please.

  • @HarpreetSingh-xq2hl
    @HarpreetSingh-xq2hl Před 5 lety

    I am a commerce students and I want to join Apple as a IOS app developer
    How can I do that
    Can anyone help me ???

  • @urass1765
    @urass1765 Před 3 lety

    Where did you finish your school work genius?

  • @loam
    @loam Před 4 lety

    This is a good video.

  • @tavherzlich3468
    @tavherzlich3468 Před 3 lety

    What I want is a video in which you won't mentioned you worked for google

  • @sarbeshkumarsingh1328
    @sarbeshkumarsingh1328 Před 6 lety

    what is your boy looks tooo much intelligent

  • @obinnaubah9045
    @obinnaubah9045 Před 5 lety +8

    You just wasted a perfectly fine piece of paper 😂