FastPrepCheck Unordered Letter Coverage
Problems/Check Unordered Letter Coverage

Check Unordered Letter Coverage

NVIDIA logoNVIDIA● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report describes unordered letter coverage using a set, but leaves multiplicity and complexity assumptions unstated. This version requires each distinct letter at least once and matches the reported core at about 85%.

Given two strings s and t, return true if every distinct letter appearing in s appears at least once in t. Otherwise, return false.

For this exercise, assume order and repetition counts are irrelevant. Multiple occurrences of the same letter in s require only one occurrence in t. Extra letters in t are allowed.

For this exercise, an empty s is covered by every target, including an empty target. A nonempty s is not covered by an empty t.

Follow-up

A set-based approach works; be ready to discuss its worst-case running time. Explain the complexity of the data structure you choose.

Function

containsUnorderedLetters(s: String, t: String) → boolean

Examples

Example 1

s = "aba"t = "bax"return = true

The distinct required letters are a and b. Both occur in t; the repeated a does not require another occurrence.

Example 2

s = "az"t = "abc"return = false

The required letter z does not occur in t.

Example 3

s = "zz"t = "z"return = true

Only the distinct letter z must be present. Counts and order do not affect this decision.

Constraints

  • For this exercise, assume 0 <= s.length, t.length <= 1000.
  • For this exercise, both strings contain only lowercase English letters a through z.

More NVIDIA Phone Screen questions

  • Network Layer Execution OrderPHONE SCREEN · Seen Nov 2026
  • Paged KV Cache AccessPHONE SCREEN · Seen Nov 2026
  • Sliding Window Attention over a KV CachePHONE SCREEN · Seen Nov 2026
  • Summarize Server Healthcheck LogsPHONE SCREEN · Seen Oct 2026
  • Hash Partition OffsetsPHONE SCREEN · Seen Oct 2026
  • Filter Paginated Medical RecordsPHONE SCREEN · Seen Oct 2026
  • Least Frequently Used CachePHONE SCREEN · Seen Oct 2026
  • Parallel String Counts with a Custom Hash TablePHONE SCREEN · Seen Oct 2026
  • Simulate a Reference-Counted Smart PointerPHONE SCREEN · Seen Aug 2026
  • Streaming Top-K Frequent ElementsPHONE SCREEN · Seen Aug 2026

Similar questions at other companies

  • Transaction Fee Calculator — Parts 1–2: Basic Fee Calculation and Conditional Fee RulesStripe · PHONE SCREENStripe interview questions
  • Detect a Straight FlushTemu · PHONE SCREENTemu interview questions
  • First Letter to Appear TwiceCisco · PHONE SCREENCisco interview questions
  • Halfway Course in a Single TrackCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Single-Condition Product FilterCrowdstrike · PHONE SCREENCrowdstrike interview questions
  • Known Words Matching Phone DigitsLinkedIn · PHONE SCREENLinkedIn interview questions
  • First Non-Repeated CharacterDell Technologies · PHONE SCREENDell Technologies interview questions
  • Convert an Entry List to a MapEPAM · PHONE SCREENEPAM interview questions
  • First Non-Repeating CharacterGoldman Sachs · PHONE SCREEN · ONSITE INTERVIEWGoldman Sachs interview questions
  • SimpleRDD Word CountDatologyAI · PHONE SCREEN

NVIDIA interview experiences

  • NVIDIA Full-Time SWE Onsite Scheduling: 1 Experience
  • NVIDIA OA: What It Tests (2026)
  • NVIDIA DevOps, QA and Infra Intern Interviews: 12 Experiences
  • NVIDIA Ignite Internship OA Experience
  • NVIDIA Software Intern Interview Questions: 9 Experiences
  • NVIDIA Ignite SWE Intern OA Questions: 6 Experiences
All NVIDIA interview questionsSee NVIDIA hiring insights
Saved
class Solution {
    public boolean containsUnorderedLetters(String s, String t) {
        // Return whether t satisfies the required letter matching.
    }
}
Checking account…