FastPrepFirst Character That Appears Once
Problems/First Character That Appears Once

First Character That Appears Once

Adobe logoAdobe● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: This problem returns the first letter of a string that occurs in it only once. The source is a post from April 2022 about an Adobe MTS-1 interview process that ended in rejection. In the first of its two rounds, this was the middle of three questions. It was shown with one sample word and the letter expected for it. The post states no rule for strings where every letter repeats, no alphabet and no limits.

Our choices: the string has 1 to 10^4 lower-case English letters. The answer is that letter as a one-character string, or the empty string when every letter repeats. The examples are new. We did not reuse the post's sample word.

Our version is about 90% the same as the reported question.

Given a string s, find the first letter, reading from left to right, that appears in s exactly once.

Return that letter as a one-character string. If every letter of s appears two or more times, return the empty string "".

Function

firstUniqueLetter(s: String) → String

Examples

Example 1

s = "streets"return = "r"

s and t each appear twice. r appears once, and it comes before e (twice) and the second s and t, so the answer is "r".

Example 2

s = "noon"return = ""

n and o each appear twice, so no letter appears exactly once and the answer is the empty string.

Example 3

s = "z"return = "z"

The only letter appears once.

Constraints

  • 1 <= s.length <= 10^4
  • s consists of lower-case English letters.

More Adobe Phone Screen questions

  • Evaluate a Parenthesized Integer ExpressionPHONE SCREEN · Seen Oct 2026
  • All Elements of Two BSTs in OrderPHONE SCREEN · Seen Aug 2026
  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Binary Tree Level-Order Traversal by LevelsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Count Occurrences in a Sorted ArrayPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Count Pairs with Absolute Difference KPHONE SCREEN · Seen Jul 2026
  • Count Subsets with Sum KPHONE SCREEN · Seen Jul 2026
  • Numbers with Exactly Three DivisorsPHONE SCREEN · Seen Jul 2026
  • Sum of Even Nodes on a Path in a Numbered Binary TreePHONE SCREEN · Seen Jul 2026
  • Largest Value in Every Sliding WindowPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • 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
  • Portfolio Valuation, Part 1Stripe · PHONE SCREENStripe interview questions
  • Single-Condition Product FilterCrowdstrike · PHONE SCREENCrowdstrike interview questions
  • Summarize Server Healthcheck LogsNVIDIA · PHONE SCREENNVIDIA 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

Interview reports that mention this question

  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
  • Adobe New Grad MTS Interview Questions: 7 Experiences
  • Adobe ML/Research Intern Interviews: 12 Experiences (Part 4 of 4)
  • Adobe Product Intern Interviews: 15 Experiences (Part 3 of 4)
All Adobe interview questionsSee Adobe hiring insights
Saved
class Solution {
    public String firstUniqueLetter(String s) {
        // Write your code here.
    }
}
Checking account…