PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Google

Find largest subset sharing a common digit

Last updated: Mar 29, 2026

Quick Overview

This question evaluates the ability to analyze arrays for the largest subset sharing a common digit, emphasizing digit-level feature extraction, frequency analysis, and set-based reasoning. Commonly asked in the Coding & Algorithms domain, it assesses practical algorithmic implementation and efficient aggregation/counting with basic data structures rather than purely conceptual reasoning.

  • easy
  • Google
  • Coding & Algorithms
  • Software Engineer

Find largest subset sharing a common digit

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Take-home Project

You are given a list `A` of **two-digit integers** (each from 10 to 99). Two integers are said to “share a digit” if they have at least one digit in common (e.g., `23` and `35` share digit `3`). Determine the **maximum size of a subset** of `A` such that **all numbers in the subset share at least one common digit** (i.e., there exists a digit `d` in `{0,1,...,9}` that appears in every number in the chosen subset). **Input:** Array/list `A` of length `m`, with each `A[i]` in `[10, 99]`. **Output:** An integer = the maximum possible subset size. **Example:** - `A = [23, 35, 30, 19]` - The digit `3` appears in `23, 35, 30` → answer is `3`.

Quick Answer: This question evaluates the ability to analyze arrays for the largest subset sharing a common digit, emphasizing digit-level feature extraction, frequency analysis, and set-based reasoning. Commonly asked in the Coding & Algorithms domain, it assesses practical algorithmic implementation and efficient aggregation/counting with basic data structures rather than purely conceptual reasoning.

Related Interview Questions

  • Solve Flower Placement and Directory Deletion - Google (medium)
  • Compute Turnstile Crossing Times - Google (hard)
  • Simulate In-Place Cellular State Updates - Google (hard)
  • Determine Whether a Word Exists in a Graph - Google (medium)
  • Implement Checksums and Feature Rollout Evaluation - Google (medium)
Google logo
Google
Oct 16, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
1
0

You are given a list A of two-digit integers (each from 10 to 99). Two integers are said to “share a digit” if they have at least one digit in common (e.g., 23 and 35 share digit 3).

Determine the maximum size of a subset of A such that all numbers in the subset share at least one common digit (i.e., there exists a digit d in {0,1,...,9} that appears in every number in the chosen subset).

Input: Array/list A of length m, with each A[i] in [10, 99].

Output: An integer = the maximum possible subset size.

Example:

  • A = [23, 35, 30, 19]
  • The digit 3 appears in 23, 35, 30 → answer is 3 .

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Google•More Software Engineer•Google Software Engineer•Google Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.