Google Phone interview questions, how hard could it be?

Amazon / Eng
lifeisbear

Go to company page Amazon Eng

PRE
Cisco
lifeisbear
Jul 24, 2019 26 Comments

I have a phone interview with Google. Yesterday I paid for Leetcode premium and tried the "Google Phone Interview" in the mock interview section.

Totally overwhelmed by one question in the test set. Couldn't solve the question at all. Came up with the correct idea but wasnt able to code. This is the question.
https://leetcode.com/problems/minimum-area-rectangle/description/

I've solved < 200 questions on LC, mostly feel confident solving the general LC medium questions. But this one is way more difficult for me than the other questions. How can I improve this kind of question? What kind of practice do I need to improve this area?

And if you know any other nice Google phone interview tips, please share. Cheers! 🍺🍺🍺

comments

Want to comment? LOG IN or SIGN UP
TOP 26 Comments
  • Uber
    UberSim

    Go to company page Uber

    UberSim
    Brute force is O(n^4) you’d have to check every possible rectangle, it’s inefficient and hard to code, but should at least be mentioned when the better solution does not come to mind

    Better solution is double for loop O(n^2) check outer loop is one corner, and inner loop is other corner, then have points also stored in hashset for fast lookup to see if other two corners exist O(n) space for the hashset

    The code for this solution is relatively simple and elegant maybe 5-10 lines, done, should take 20 minutes of discussion and coding leaving another 25 minutes for interviewer to ask their “real” question
    Jul 24, 2019 9
    • Uber
      UberSim

      Go to company page Uber

      UberSim
      That’s one way
      Jul 24, 2019
    • Uber
      UberSim

      Go to company page Uber

      UberSim
      At Uber scale finding the smallest rectangle in those billions and billions of rectangles becomes meaningless, especially if those rectangles are constantly changing size and location, because if I can find a rectangle that’s close enough to the smallest rectangle that is fine if it doesn’t require me to search through all O(n^2) combinations, I’d greatly prefer to estimate the smallest in O(lgn) time
      Jul 24, 2019
  • Chase / Eng
    8==D~

    Go to company page Chase Eng

    8==D~
    Try not to fixate too much on one question that you couldn’t figure out. You’ll never get to a point where you’ll never be stumped.

    Instead, enjoy a little encouragement in the fact that you are probably far more prepared than the average candidate.

    Good luck.
    Jul 24, 2019 1
  • Fidelis Cybersecurity / Eng
    pzhang15

    Fidelis Cybersecurity Eng

    PRE
    EchoStar
    pzhang15
    Google like it hard
    Jul 24, 2019 2
    • Amazon / Eng
      lifeisbear

      Go to company page Amazon Eng

      PRE
      Cisco
      lifeisbear
      OP
      Seems like it. Do you think the company specific questions on Leetcode are close to the real ones?
      Jul 24, 2019
    • Fidelis Cybersecurity / Eng
      pzhang15

      Fidelis Cybersecurity Eng

      PRE
      EchoStar
      pzhang15
      Yes, you should sort them by frequency. Also Google sometimes won't ask the exact same questions, so you have to understand the underlying concept.
      Jul 24, 2019
  • Expedia Group / Eng
    hnAy18

    Go to company page Expedia Group Eng

    hnAy18
    I had this question when i was applying for a grad position back in 2014. It really crushed my dreams at Google...
    Jul 24, 2019 2
  • Microsoft / Eng
    SwitchJobs

    Go to company page Microsoft Eng

    SwitchJobs
    For a person with some regular prep, this is definitely a good medium but not a hard one or may be lower hard.
    Jul 24, 2019 1