ZipRecruiter Phone Screening

Posted
15 Oct 2025
343 reads

Summary

I had a phone screening interview with ZipRecruiter where I was given a coding challenge to find the maximum occurring restaurant names from a 2D array, handling tie-breakers and a follow-up on weighted occurrences.

How it went

My recent phone screening at ZipRecruiter involved a coding question. The interviewer presented a scenario with a 2D array of restaurant names and asked me to identify the name(s) that appeared most frequently. It was crucial to handle situations where multiple names shared the highest frequency by returning all of them. A specific constraint was also mentioned: if the rows in the input array weren't uniform in length, I should return an empty array. Following the main problem, we discussed a follow-up where each restaurant name would have an associated weight, and I needed to explain how I would incorporate these weights into the frequency calculation.

Questions asked (2)

  1. 01

    Max Occurring Restaurant Names in 2D Array

    Data Structures & Algorithms

    Given a 2D string array (String[][]) of restaurant names, return the restaurant name(s) that occur with the maximum frequency.

    Input Example:

    {{"a", "b", "c"},
     {"a", "c", "d"}}

    Output Example:

    {"a", "c"}

    Explanation: "a" and "c" occurred twice each, which is the maximum frequency. "b" occurred once. If there's no tie, return only the single name with max occurrences.

    Constraint: If the shape of each row is not the same (i.e., rows have different lengths), return an empty array.

    Method Signature:

    String[] getRestaurentWithMaxVotes(String[][] res)
  2. 02

    Max Occurring Restaurant Names with Weights

    Data Structures & Algorithms

    Follow-up: While calculating the vote or score for each restaurant name, include a weight. For example, "a" has weight 3, "b" has weight 2, etc. for the 1st row, and similarly for the second row. How would you adapt the getRestaurentWithMaxVotes function to handle this?

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Ziprecruiter 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!