FastPrepReverse a String
Problems/Reverse a String

Reverse a String

Adobe logoAdobe● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: You return a string with its characters in reverse order. A report from an Adobe software engineer in India (September 2024) lists string reversal as its one coding question, next to questions about the company. It says nothing about the function signature, the characters allowed or the length.

We chose these rules. The function returns a new string instead of changing a character array in place. Strings have up to 10^4 characters, made of English letters, digits, spaces and a few punctuation marks. We wrote new examples.

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

Given a string s, return a new string that holds the same characters in reverse order: the last character of s comes first and the first comes last.

Every character counts, including spaces and punctuation.

Function

reverseString(s: String) → String

Examples

Example 1

s = "drawer"return = "reward"

Read from the last character to the first: r, e, w, a, r, d.

Example 2

s = "a man, a plan!"return = "!nalp a ,nam a"

Spaces and punctuation are characters too and move with everything else: the ! at the end comes first.

Example 3

s = ""return = ""

An empty string reversed is still empty.

Constraints

  • 0 <= s.length <= 10^4
  • s contains only English letters, digits, spaces and the characters . , ! ? -

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

  • Check if a String Is a PalindromeCisco · PHONE SCREENCisco interview questions
  • Halfway Course in a Single TrackCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Reverse a StringAmazon · PHONE SCREEN
  • Reverse a String ManuallyNewgen Software · PHONE SCREEN
  • Reverse a String with Two PointersSnowflake · PHONE SCREENSnowflake interview questions
  • Palindrome with One DeletionWhatNot · PHONE SCREENWhatNot interview questions
  • Valid Word AbbreviationMeta · PHONE SCREENMeta interview questions
  • Reverse a StringPersistent Systems · PHONE SCREEN
  • Minimum Changes for Palindromic BlocksCitadel · OA · PHONE SCREEN · ONSITE INTERVIEWCitadel interview questions
  • Valid Palindrome IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions

Interview reports that mention this question

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

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 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 reverseString(String s) {
        // Write your code here.
    }
}
Checking account…