FastPrepPrime Number From a String
Problems/Prime Number From a String

Prime Number From a String

Adobe logoAdobe● EasyNEW GRADOA

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report names a task involving strings and prime-number detection without a full prompt. This practice version treats the string as a decimal integer and authors leading-zero behavior, numeric bounds and the boolean interface.

Given a decimal digit string text, return whether the nonnegative integer it represents is prime. Leading zeros do not change the value.

A prime integer is at least 2 and has no positive divisors other than 1 and itself.

Function

isPrimeText(text: String) → boolean

Examples

Example 1

text = "00013"return = true

Leading zeros are ignored, giving 13. Its only positive divisors are 1 and 13.

Example 2

text = "49"return = false

49 = 7 × 7, so 49 is composite.

Constraints

  • 1 <= text.length <= 10
  • The text contains only ASCII decimal digits and represents an integer from 0 through 1000000000.

Source note: Screenshots of public Reddit comments describing the reported Adobe OA task and any included author clarification. The practice version adds the details stated in the source note.

More Adobe Online Assessment questions

  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Top-Funded Villages and ProjectsOA · Seen Aug 2026
  • Count Parent Nodes With a Target SumOA · Seen Aug 2026
  • Largest Binary Number by ConcatenationOA · Seen Aug 2026
  • Count Events by CategoryOA · Seen Aug 2026
  • Graph M-ColoringOA · Seen Aug 2026
  • Hall of Shifting TilesOA · Seen Aug 2026
  • K-th Ancestor Subtree Preorder QueryOA · Seen Aug 2026
  • Maze ReachabilityOA · Seen Aug 2026
  • Minimum Numeric Code TransformationOA · Seen Aug 2026

Similar questions at other companies

  • Identification Number Check DigitAbridge · OAAbridge interview questions
  • Count Substrings With Identical CharactersVirtu Financial · OAVirtu Financial interview questions
  • Count Multiples of Three with Two SevensHudson River Trading · OAHudson River Trading interview questions
  • Is This Date a Weekend?Salesforce · OASalesforce interview questions
  • Triple-Position Alphabet EncodingArm · OA
  • Closest ColorTwo Sigma · OATwo Sigma interview questions
  • Sum Integer StringsIntuit · OAIntuit interview questions
  • Digit Changes for a Multiple of 9Nutanix · OANutanix interview questions
  • Count Times Using at Most Two DigitsLSEG · OALSEG interview questions
  • Valid String CheckUber · OAUber interview questions

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 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 boolean isPrimeText(String text) {
        // Write your solution here
    }
}
Checking account…