Google Coding Round 1

Posted
31 Aug 2025
464 reads

Summary

I had a Google coding interview where I was challenged to find the number of squares formed by a given set of coordinates, initially with axis-parallel sides and then with any orientation.

How it went

My recent coding round at Google began with an interesting geometry problem. I was given a list of [x, y] coordinates and asked to determine the total number of squares that could be formed using these points. The interviewer first clarified that the sides of the squares must be parallel to the x and y axes. After discussing this, a follow-up modified the problem to consider squares with any orientation, making it a more complex challenge.

Questions asked (2)

  1. 01

    Count Axis-Parallel Squares from Points

    Data Structures & Algorithms

    Given a list of [x, y] coordinates on a coordinate plane, find the number of squares. The sides of the squares are required to be parallel to the x and y axes.

  2. 02

    Count Squares from Points (Any Orientation)

    Data Structures & Algorithms

    Follow-up question: Given a list of [x, y] coordinates on a coordinate plane, find the number of squares. The sides of the squares are NOT required to be parallel to the x and y axes, but it must still be a square.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Google recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!