How to: Work at Google - Example Coding/Engineering Interview

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • Watch our video to see two Google engineers demonstrate a mock interview question. After they code, our engineers highlight best practices for interviewing at Google. Learn more about how we hire at goo.gl/xSD7jo, then head over to goo.gl/6M5KCG to find your role.

Komentáře • 162

  • @young2007mills
    @young2007mills Před 7 lety +186

    When she said she was gonna throw a wrench into the mix I felt the pain lol.

  • @jg9425
    @jg9425 Před 7 lety +217

    I realize I've got a long way to go. This gives me motivation, though.

  • @gnawlix
    @gnawlix Před 2 lety +24

    Really helpful video. This reminds me of the classic Two Sum problem on LeetCode. Since we are told a pair of numbers equals a target sum, we can say that x + y = target. And solving for y (complement of x), we see that y = target - x. Therefore, we can just walk through the input sequence and for every element, insert it into a hash set while performing a lookup in the hash set to see if for a given `x` value (arr[i]) we can find a `y` that satisfies x + y = target.

  • @brianlc
    @brianlc Před 2 lety +13

    2016: 2 sum
    2022: solve the travelling salesman problem in polynomial time 😭

    • @jeremiahbenjamin5776
      @jeremiahbenjamin5776 Před 10 měsíci +1

      Yeah, interviews are much much harder than this now. Honestly, if you were asked 2 sum today (which you probably will not be), and it took you just as long to solve as in this video, with all the same dialog and clarifying questions etc, you will probably be rejected along with pissing the interviewer off. All LC easies should be trivial for anyone looking to break anywhere into Big Tech.

  • @victorcalabuigrodriguez1262

    I love the acting from the guy pretending to be looking for the answer. Thankfully for him he is an engineer and not an actor XD

  • @kwametseymathiasaledi5373
    @kwametseymathiasaledi5373 Před 4 lety +14

    I have a lot do now. I need to Study hard. Thanks googler, its very motivating

  • @randy4ii411
    @randy4ii411 Před 10 měsíci +4

    Thank you guys for these amazing resources. It does make me feel less competent and ready but we can only learn hey.

  • @drmilance
    @drmilance Před rokem +1

    Thank you, lady, for inserting that 'coma' at 14:20. My world collapsed a moment before.

  • @rrobetti
    @rrobetti Před 2 lety +9

    Awesome. Thanks for this, is really helpful. You could use a Bloom Filter instead of the hash set to save on space complexity(O(1)) as per you only need to know if the complement is NOT in the list.

  • @saiadityaurumu1655
    @saiadityaurumu1655 Před 6 lety +12

    I love the way in which he thinks :)

  • @mtomazza
    @mtomazza Před 7 lety +12

    Such a nice video. Very well conducted by both.

  • @andrewroc30
    @andrewroc30 Před 5 lety +6

    For the last part of the problem, wouldn't it have made sense to do some pruning along the way for repeat complements? It would have bumped up the running time, but for a case where space seems to be the main issue, that would be a necessary sacrifice for the problem if you were to not use multiple systems, wouldn't it?

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

    Wow great job brilliant solution. but am worried what if the set was of the form [1, 2, 2 ,4]. This algorithm seems to dual mostly on two digits that sum to the required number and not when we have multiple digits.

    • @madhououinkyoma
      @madhououinkyoma Před 4 lety +3

      Harisu fanyui well that’s what the question was. No need to solve anything else than the question given to you..

    • @hmm7458
      @hmm7458 Před 4 lety

      well set doesn't contain repetitive values

  • @abhikamboj653
    @abhikamboj653 Před 4 lety +14

    Can someone explain the scaling part to me.
    19:47 “If my set fits in memory, but my whole input doesn’t fit in memory then I can just process it in chunks. I chunk it, I just put it in a set, and accumulate it in the set.” -This doesn’t make sense to me. If the whole input doesn’t fit in memory, in worst case the set would contain the whole input (the case where there is no sum) sooo the set wouldn’t fit in memory either? Even if your processing the data in chunks, you would be using the same set for every chunk which doesn’t work?

    • @huili2065
      @huili2065 Před 4 lety +6

      I don't know if my understanding is correct or not. I think because the interviewer mentioned that the range of the value is limited, also HashSet would not contain repeated values. So the size of the HashSet would be limited and will be able to fit in the memory.

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

      @@huili2065 thank you so much. I think you're right.

  • @thealihassan
    @thealihassan Před 7 lety +31

    Great job googlers! Keep em coming please :)

  • @bhavikpatel2326
    @bhavikpatel2326 Před 3 měsíci

    def array_sum(array):

    sum = 0
    for element in array:
    sum += element
    return sum
    array1 = [0,1,5,2]
    total_sum = array_sum(my_array)
    print("The sum of the array is:", total_sum)

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

    This question was way too easy. Literally every single google interview question i've seen so far on youtube has been so easy. Is it really this easy

  • @vasudevsharma4413
    @vasudevsharma4413 Před 3 lety

    In the loop we can subtract the value like :-( sum - value ) and then find the output in before Position. if it found it return true and if not then false. In this case we not need to store any data.

  • @marvXn.17
    @marvXn.17 Před 2 lety +1

    I have a long way to go... But this is a motivation

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

    This video was very helpful, thank you. Please do more videos like this.

  • @abdullaqeblawi5438
    @abdullaqeblawi5438 Před 7 lety +12

    Who writes the music for these videos. Hahahaha jk. It's very relaxing.

  • @cwash08
    @cwash08 Před 7 lety +19

    I find this valuable, thanks a lot!

  • @notbad4367
    @notbad4367 Před měsícem

    I wanna one help
    I'm a AI& DS student you suggest me back end program language because so many people say to me you must learn java but I'm already complete python basic level know I'm confused plz help me i focus on python or i wanna switch java

  • @MichelleB022
    @MichelleB022 Před 2 lety

    interesting, i was thinking since it is sorted to start checking at the end, skipping numbers which are too large and when you get to number that is

  • @ranjithmg5653
    @ranjithmg5653 Před 3 lety +4

    another checking possibility to reduce time complexity:
    if the asked sum is even and
    the adding numbers should be (even and even) or (odd and odd)
    if the asked is odd
    the adding numbers should be (even and odd)

  • @bhavikpatel2326
    @bhavikpatel2326 Před 3 měsíci

    [0,1,5,2] sum=08 hence prove according to criteria

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

    Since comp.find is logarithmic and you are repeating this for every value in data, then the actual time complexity of the function is O(N*logN). Why did they say it was linear?

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

      Not trying to be mean or anything, but I think you may need to review how data is stored in an unordered set. From my understanding, The add function will take the integer and using something similar to a hashing function, get a unique key which is probably used to get the index in the container of the stored value. When you use the find function, it probably uses the same hashing function to get the index of the stored value. If the value isn't found, at that index, the find function goes through the rest of the container to find the value. Here are two facts for you - Average case of find is constant time complexity O(1), and worst case is linear in container size O(n) which can be found at the bottom of the page here: www.cplusplus.com/reference/unordered_set/unordered_set/find/
      The worst case of using this function is O(n) so if for all n values in data we have an O(n) time complexity for the find function, the solution will have an O(n^2) time complexity. However, that is highly unlikely seeing as even a basic hashing algorithm with a relatively small prime number can prove to yield O(1) time complexity more often than not. I hope this helps you to learn why they said it was linear! I have a phone interview coming up and I'm hoping to learn and help as many people as I can along the way.

  • @ajr1791ze
    @ajr1791ze Před 5 lety +6

    in problem 1 : we can simply use map storing values and index .

  • @AkshatSinghania
    @AkshatSinghania Před 3 lety +3

    I did this problem on leetcode when i was like 12yo

  • @yashtibrewal4259
    @yashtibrewal4259 Před 4 lety +3

    I still have something unclear, if the whole input does not fit in memory, and you are processing it parallel, and adding the compliments in the list, when we reach towards the end (while merging) it will still be big enough not to work on a single computer, what am I missing? Is it that the merged array would be built and stored in a distributed manner?

    • @hmm7458
      @hmm7458 Před 4 lety

      i guess yes that's why he said it is possible when we are working in 2 or more computer and set is distributed among those computer

    • @argothiel
      @argothiel Před 2 lety +1

      You are merging only the (hash) sets of values. If the values are limited, then your set will be small enough to fit in. I believe that's what he said.

  • @ahmedadamahmedahmed1268

    I have a lot do .now .I need hard thanks Googler ,its very motivating

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

    Great video. Thanks for the tips, they're certainly helpful.

  • @brijeshpatel0904
    @brijeshpatel0904 Před 2 lety +1

    Are they trying to send message to the candidates to feel more comfortable while having the Coding interview? And encourage them to ask questions if they are not clear what they are going to solve?

    • @brijeshpatel0904
      @brijeshpatel0904 Před 2 lety

      def checking_pairs(a_list, a_sum):
      array_len = len(a_list)
      temp = 0
      new_array = []
      while temp < array_len-1:
      if (a_list[temp] + a_list[temp+1]) == a_sum:
      new_array.append([temp, temp+1])
      temp += 1
      if len(new_array):
      print(f"Array index/es which sum:{a_sum} are: {new_array}")
      else:
      print("There are not any single value pair which form the asking sum {a_sum}.")
      array_list = input("Write any numbers separated by space.: ")
      array_list = array_list.split()
      map_object = map(int, array_list)
      array_int_list = list(map_object)
      # print(array_int_list)
      sum_of_pair = int(input("Enter the sum you want from pair.: "))
      # print(sum_of_pair)
      checking_pairs(array_int_list, sum_of_pair)
      "Because the problem is not looking that big." I am still in the learning so please guide if I have done something wrong here.
      Like if you are looking for pairs which is equals to the sum then can't we just start adding the next index value?

  • @singhini8331
    @singhini8331 Před 2 lety +1

    What if we use if -else loop to get output

  • @johnsmith-qf8iy
    @johnsmith-qf8iy Před 3 lety +1

    Well The Question goes like this I suppose:
    lets say
    (python 3)
    lst = [1,2,3,4,5,6]
    for i1 in lst:
    i2 = 8 - i1
    if i2 in lst:
    print(i1, i2)
    we get the pairs

  • @patrickw9454
    @patrickw9454 Před 2 lety

    a small problem with empty data: data.size() is unsigned int, after minus one, it will become extremely big, you have to convert it to int first.

  • @razvanwist4185
    @razvanwist4185 Před 2 lety +2

    Actually, the find() method for sets has a logarithmic lookup time, which would make the complexity O(n log n) instead of liniar.

    • @andreisfrent1
      @andreisfrent1 Před 2 lety

      Depends on the implementation of the set, no? Hashsets should take constant time on average for find().

    • @kolyacpp
      @kolyacpp Před 2 lety +1

      std::set is binary tree - O(log n)
      std::unordered_set is hash table - O(1)

  • @Shams_
    @Shams_ Před rokem

    My Code :
    nums = input('Enter Numbers ').split()
    numlst = []
    for i in nums:
    k =int(i)
    numlst.append(k)
    for n in range(len(numlst)):
    cns = 8-numlst[n]
    if cns in numlst:
    print('Yes')
    break
    else :
    if n == len(numlst)-1 :
    print('No')

  • @Denverse
    @Denverse Před 5 lety

    def checkSum(myList, s):
    start, end = 0, -1
    for x in range(len(myList)):
    k = myList[start]+myList[end]
    if k == s:return True
    else:
    if k > s:end -= 1
    elif k < s:start += 1
    return False
    print(checkSum([1, 4, 4, 5], 8))
    #did that in 2 minutes in python, before he writes the code...!

    • @johnsmith-qf8iy
      @johnsmith-qf8iy Před 3 lety

      LOL
      Are you out of your mind
      Do this
      lst = [1,2,3,4,5,6]
      for i1 in lst:
      i2 = 8 - i1
      if i2 in lst:
      print(i1, i2)
      we get the pairs

    • @cheekz7082
      @cheekz7082 Před 3 lety

      Only works for a sorted list as he explains

  • @subi_n_8761
    @subi_n_8761 Před 2 lety

    First pair you change to no 9 to 7 and give command to no and yes then click 9 error will appear

  • @dataman4503
    @dataman4503 Před 3 lety

    Strange question: What is the size of whiteboard in feet? 3x2?

  • @krishnendramishra89
    @krishnendramishra89 Před 7 lety +3

    At time =15m44s,
    I want to know about complexity of
    line ------ if(comp.find(value)! -----
    As I implement same in C,
    When I compare/Find like function as ----comp.find(value) ---
    Complexity of this step becomes N i.e. for finding element in compliment array,
    so total complexity becomes N^2 in worst case , average it less than N^2.

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

      it's not an array -- it's a hashset. bigocheatsheet.com/

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

      But yes, worst case of a hashset could in theory lead to worse than O(1) time for find

    • @AnhNguyen-wo8qg
      @AnhNguyen-wo8qg Před 4 lety +1

      @@DavidGUSC actually, performing a search in a hashset will always be O(1). A hash table only gets slower (to O(n)) if there are repeating elements in the same key. They talked about not needing to use a key; therefore, using a hashset instead of hashtable. Since repeating elements are not listed, we will not have a situation where there are multiple values associated with the same key. The drawback is that the hashset will not record how many instances of the same element is present in the data set. This is exactly why he was pondering about repeating values in the data set before settling on comparing the current value with the complement of everything the program has already seen.

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

    I know its been a year since the posting of the video, but I have a question regarding your code which I hope you would explain it to me. First, I like the way you solved this problem. This is really clever solution. second, My Question is: why do you need ( != comp.end ) part? Since you are checking before inserting, its always going to check only the previously added complements. Thanks for posting the video anyway.

    • @donggari
      @donggari Před 6 lety +9

      It's a particular characteristic of the unordered_set structure in C++. He's not comparing to the last element in the container; "comp.end" in this case returns an iterator to the element following the last element in the current container context. This is necessary as unordered_set::find(int value) will either return an iterator to the value if found, or if it doesn't exist, the iterator to the "past-the-end" element following the end of the current container, which coincidentally is the same "location" as unordered_set::end(). It's a standard check to ensure that the currently searched value is indeed inside the current container context.

  • @Weckacore
    @Weckacore Před 6 lety

    Very intense, super interesting. Also, fun problem!

  • @subha......9057
    @subha......9057 Před 2 lety +1

    Hallo Google I am india for student the following URL and to join to google jobs for student......

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

    Thanks for the upload

  • @amazingarc2787
    @amazingarc2787 Před 2 lety

    can anyone explain to me the condition in if statement ... thanks

  • @DejuanJohn
    @DejuanJohn Před 6 lety +5

    😩 just when I thought 1 + 1=2
    A new for of mathematics comes

  • @ayoubdkhissi
    @ayoubdkhissi Před rokem

    great video. thanks

  • @subi_n_8761
    @subi_n_8761 Před 2 lety

    And binary had confirmed with asking decimals !

  • @rifat.ahammed
    @rifat.ahammed Před 2 lety

    Thank You very much

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

    11:26 "But it's too slow for Google"

  • @user-xo5gi3gi3f
    @user-xo5gi3gi3f Před 2 lety +2

    For this problem specifically, since there will only be an addition of two number, all you need to do is to subtract one elements of the arrays from 8. If the result matches one of the remaining elements then the number you subtract from and the result will be the pair of two number that sums up to 8. You will only have to do this four times or the number of elements you have in an array.

  • @bashkalike5211
    @bashkalike5211 Před 4 lety

    What I realized from interview questions is that mostly they based on data structure and algorithm. Personal thought though.

    • @TheDemonThorn
      @TheDemonThorn Před 3 lety +1

      well it is one of the most important things in coding. everything is an algorithm and understanding data structures just allow you to make codes faster and more efficient

  • @CCUSuryaS
    @CCUSuryaS Před 3 lety

    It's useful for me❤️

  • @emmanuelmtali1594
    @emmanuelmtali1594 Před 4 lety

    Edge case: negative integers

  • @kie_.6107
    @kie_.6107 Před 5 lety

    How much math do we actually have to know for this software programming becz like fuc i hate math and i love computer

    • @scikick
      @scikick Před 5 lety

      Depends. For data science, game development, A LOT of high level maths knowledge is essential.
      For web/app development, depends on what you're working on. In general, not very much. Although, the mindset is pretty much the same.
      I could be calculating some integral, or I could be designing a complex architecture for data flow in my webapp, in both cases I feel like I'm solving very similar problems. In both cases, you'll be running through a lot of alternatives in your mind, and quickly choosing the best ones to work with. Problem-solving is what computer science is all about.

  • @thasvithu
    @thasvithu Před 8 měsíci

    Such a nice video :)

  • @THESCENECREATORS
    @THESCENECREATORS Před 6 lety +5

    I m coming google get ready for world best programmer👌😊

  • @Tolgahan764
    @Tolgahan764 Před 6 lety

    I loved it !

  • @KnowledgeTube662
    @KnowledgeTube662 Před 4 lety

    Can i use Hindi language for communicate with Google recruiter

  • @ahmedadamahmedahmed1268

    waw at it's very good. I need additional information

  • @sergeantapone1607
    @sergeantapone1607 Před 4 lety

    I didn't understand something about the solution to "throwing in the wrench." How is it better than the first solution (brute force where for each element, you check each other element). He says it's linear, but I don't see that. You loop n times through the for loop, but in each iteration, you have to find an element in comp. To find whether a value is in comp, you need to check each element of comp. So the time complexity would surely be O(sum(r from r=1 to n)) = O(n^2). Unless I'm misunderstanding something about how unordered_set and how comp.find(value) works (I don't really know how they work at all, but I don't see how the complexity of comp.find(value) wouldn't depend on the length of comp)

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

      finding an element in comp is linear time because it is a hash set. to learn more search "why is hash look up constant time" This fast input and retrieval/searching is always O(1) in a hash set/table/dictionary. Since hashing uses a hash function, you don't have to check each element in comp. It will point you directly to it based on the hash function. You can also search up videos on what a hash function is to learn more. Vote Bernie 2020.

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

    OMG! i can only do sorting!!! even odd!

  • @ankittiwari8892
    @ankittiwari8892 Před 4 lety

    1x2+3+3=8 excluding √
    1x2+4+2=8

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

    Lovely!

  • @fforfun2257
    @fforfun2257 Před 4 lety

    These questions are so easy for me..

  • @ShinAkuma
    @ShinAkuma Před měsícem +1

    Thanks. But they asked me to design a spaceship instead.

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

    just a minor typo, it is comp.end() ... doesn't change the general idea but still :p

    • @edgarduenez-guzman2554
      @edgarduenez-guzman2554 Před 7 lety +4

      Absolutely correct! A good example of how having a typo or other very minor mistakes in your code don't actually matter in an interview.

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

      You did a superb job, that was a real pleasure to watch. Congrats

  • @nishanchetia5176
    @nishanchetia5176 Před 3 lety +2

    Hello 🤗, I am a student studying in class 11 with arts stream. I am thinking that can I be a part of Google if I am arts stream student. My aim is to get job in Google. Can I get it or not? Please respond 🤗🤗 ..i want to know. Which degree will be best for me to get job in Google. Actually, I am a student from India. From class 6 my aim is to be a part of Google. This present year, I had passed out class 10 board exams. Before getting results my choice was to choose Science stream but I had opted Arts because science marks was poor. In other subjects like English I scored 81% and in social science I scored 89%. My mood was totally bad that I can't get job in IT companies 😣. But I have seen that the people who are working in Google have said that anyone from any stream can get job in Google, but you must have creative skills and many more. I just asking one question please reply can I get job in Google?
    Hope you will reply sir.

    • @VIGNESHWARANS-op7wo
      @VIGNESHWARANS-op7wo Před 2 lety +1

      100% you can get a job in Google!!...No degree matters to get into google. First learn basics of some of programming languages (C,C++, Python,Go,etc).Then, select any one of that suites for you. Then, learn all the concepts with side by side implementation.Then,move on to data structures and algorithms and also develope a problem solving ability in mathematics.it helps in buliding a logic in code.Then, Constantly practice!... practice!... And Never give up!..you will definitely get a job into google. i am also non CSC students. After my graduation I fixed my mind to get into product based IT company like Google. So,now i am learning programming from one year before and till continuing.Now, ihave learnt all basics in C++ programming language .Now i am going to move on to Oops concepts and DSA. Keep going!. We will achieve our goal... 🌠

  • @RedaAlb2
    @RedaAlb2 Před 5 lety

    I haven't watched video yet, just problem. First idea I am having to solve it is, looping through all the numbers in array, then using binary search to find the needed matching pair to make 8, if any. This will be O(nlogn). Let's how I did. Will continue watching video now.

    • @RedaAlb2
      @RedaAlb2 Před 5 lety

      Heeey! He is doing my idea lol

  • @mr.potato652
    @mr.potato652 Před 3 lety

    Nice mam or sir ✓

  • @rajansaharaju1427
    @rajansaharaju1427 Před 4 lety

    Lovely...

  • @hobojoe4910
    @hobojoe4910 Před 2 měsíci

    They really out here asking for masterclass resumes and for you to have found the meaning of life only to hit you with a basic 2sum problem at the actual interview.

  • @9def
    @9def Před 9 měsíci

    18:11 exciting blackboard eraser fall

  • @lasanthabasnayake
    @lasanthabasnayake Před 4 lety

    great stuff.. thanks 🙇‍♂️

  • @mathsadda7507
    @mathsadda7507 Před 4 lety

    Did commerce students get job in Google

  • @uditsharma1455
    @uditsharma1455 Před 5 lety

    can someone please tell me what does comp.end do.

    • @58book
      @58book Před 5 lety

      I haven't been programming for long (and I only know Java), but from the api, I think that comp.end returns true once it goes past the last value in the HashSet. So the IF statement basically says: If this value in the vector equals one of the compliments in the HashSet (which means that it found a sum pair) AND we have NOT reached the end of the HashSet, the return true.
      In other words, once one of the vector values matches a value in the compliment HashSet, comp.find(value) will be true and comp.end will be false. And since false != true, we will enter the IF statement.

    • @sarthakdubey4362
      @sarthakdubey4362 Před 5 lety

      @@58book comp.find(value) returns the index of the value in comp if the value is present, else it returns comp.end(), which is the pointer to the last element of comp(the pointer where the next value will be inserted). If value is present in comp, then comp.find(value) != comp.end(), hence the above if statement.

    • @58book
      @58book Před 5 lety

      @@sarthakdubey4362 thank you!!

  • @IsraelWokoh
    @IsraelWokoh Před 2 lety +1

    Nice to know I would have failed in the first 30 seconds...

  • @saulmtzv
    @saulmtzv Před 7 lety

    The value that you are looking for should be the complement (ie sum-value), not the value itself, great video btw

  • @omarvayani3452
    @omarvayani3452 Před 3 lety +1

    This is the math of common sense 😂

  • @tinashe3753
    @tinashe3753 Před 5 měsíci

    l dont really understand the problem

  • @popAssassino
    @popAssassino Před 6 lety

    i think its easy like this
    int sum= (1*2)+9-3; //i think its 8 at first 1

  • @kennethwashington_anderson7145

    Oh okay 😊👍👍😂👌.

  • @peg13579
    @peg13579 Před 4 lety +41

    it's painful to watch. just use a map.

  • @amanchimankar7910
    @amanchimankar7910 Před 2 lety

    👍

  • @abrahanraymundom7370
    @abrahanraymundom7370 Před 3 lety

    it seems like a competitive programming problem

  • @deeXaeed
    @deeXaeed Před 4 lety

    There can't be two same elements on the same index. Wut? What array has TWO things at ONE index?

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

    I thought of a better solution than him that would work in half the time of what he is proposing.
    So does this mean I can get an internship??

    • @nikhilpathania
      @nikhilpathania Před 5 lety

      can you tell me what solution do you have?

    • @AnhNguyen-wo8qg
      @AnhNguyen-wo8qg Před 4 lety +2

      @@nikhilpathania No, no he can't.

    • @hmm7458
      @hmm7458 Před 4 lety

      it's just a demo ques actuals ques are a bit hard than this

  • @im_love_98
    @im_love_98 Před rokem

    Hii

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

    what language is this

  • @Renata-hb3ru
    @Renata-hb3ru Před 9 měsíci

    ,,1-9

  • @user-yv2kz7ep5l
    @user-yv2kz7ep5l Před 5 lety +4

    解题一秒钟,表演一小时

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

    i want job in google but iknow only 3 programing languages
    1] java
    2] php
    3] html
    i am 14 year young from india

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

      It's not about how many languages you know it's about how you think of any problem. So language would not be the problem to get a job in google.
      try to solve the coding problems.

    • @shaswata56
      @shaswata56 Před 5 lety +10

      HTML?!
      LOL

    • @pushkar-tiwari-99
      @pushkar-tiwari-99 Před 5 lety

      First of all, HTML is not a programing language and second thing in google server there are a lot of data how to write code so they don't care about the information you have they only care about how you going to solve a real-world problem....but it is a good thing, at the age of 14 you learn a lot focus on logic building and algorithms.

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

      How can you know java and not know c and c++?

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

    I'm asking this VERY seriously: Is this a joke???
    I'm learning programming for no more than one year now, and I solved it as he's final result maybe 5 minutes into this video.
    So regarding my question, is this really the level required for Google?
    Is that in general considered a high-level programming?

    • @gigos2
      @gigos2 Před 3 lety

      @Dexter Gomez Either the worst AI wrote this message or you're simply speaking gibberish.
      Couldn't understand a single thing from your message.

    • @michellefanter4671
      @michellefanter4671 Před 3 lety

      This is an easy question imo
      did you get a job yet?

    • @gigos2
      @gigos2 Před 3 lety

      @@michellefanter4671 Did not.. Everyone wants work experience..
      I'm sending resumes multiple times a week..
      Everywhere I hear companies that says "no previews experience needed" but when I send the resume they answer otherwise.

    • @michellefanter4671
      @michellefanter4671 Před 3 lety

      @@gigos2 You should gain experience through personal projects. Look for intern positions. If questions like these are easy for you, then you should pass the technical reviews :)

    • @gigos2
      @gigos2 Před 3 lety

      @@michellefanter4671 I understand what you're saying, but the reason I'm automatically get passed is just because I have now work experience. That's all that matters to everyone. I have no doubts I can pass any job interview.

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

    That noob man...
    He crossed the first array 2:00 .... and then asked her if he could repeat the elements... and they are making 'example interview'

  • @johnsmith-qf8iy
    @johnsmith-qf8iy Před 3 lety

    I don't think He would take such a long amount of time
    its just a matter of 2 min for someone who is a intermediate even
    LOL
    he is pretending to be slow
    LOL

  • @LemonChieff
    @LemonChieff Před 3 lety

    `+data[hi]`… AND… You've just invoke undefined behavior.
    EDIT: Wait nevermind. My bad. Implicit conv… Well technically it's still UB. Just way earlier. Signed overflow is still ub (granted if you that large a vector you might want to rethink something. (also infinite loop but that's cheating). Still why use an int where you get a `std::vector::size_type` smh. And that while loop confuses me. (Besides being potentially wrong) I'm way too sleep deprived for that amount of questions. iterators wouldn't kill either. (So many whys)
    Fix is obviously don't pass keep a `std::numeric_limits::max() + 2ULL` sized vector to the function…
    Or don't have so many implicit conversations.
    The answer in itself is fine though. (I'm just over sensitive to potential UB)