FastPrepBacktick Identifier Converter
Problems/Backtick Identifier Converter

Backtick Identifier Converter

Hudson River Trading logoHudson River Trading● EasyOA

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: This came from a real HRT OA report. The original report shared the core backtick identifier conversion task; FastPrep filled in the runnable function format and practice examples so you can try it here. Estimated match rate: 85-90% for the core task, 65-75% for exact wording and runner details. If you find a fuller version, feel free to let us know and we will update it.

You are given a string text. Some identifiers in the string are wrapped in backticks, such as `user_id`.

For every backtick-wrapped identifier:

  • If the identifier is an all-uppercase constant, leave it unchanged.
  • Otherwise, treat it as a snake_case function or variable name and convert it to camelCase.

Return the full string after converting only the text inside complete backtick pairs. Preserve the backticks and all text outside them.

An identifier is treated as an all-uppercase constant when it contains at least one letter and every letter in it is uppercase. Underscores and digits do not affect this check.

Function

convertIdentifiers(text: String) → String

Complete convertIdentifiers.

  • String text: the text to transform

Returns String: the transformed text.

Examples

Example 1

text = "Call `get_user_name` before reading `MAX_RETRY_COUNT`."return = "Call `getUserName` before reading `MAX_RETRY_COUNT`."

get_user_name is converted to camelCase, while the uppercase constant is unchanged.

Example 2

text = "Use `parse_http_response` and `user_id` now."return = "Use `parseHttpResponse` and `userId` now."

Both snake_case identifiers inside backticks are converted and the rest of the text is preserved.

Constraints

  • 1 <= text.length <= 10^5
  • text contains printable ASCII characters.
  • Backtick-wrapped identifiers contain letters, digits, and underscores.

More Hudson River Trading Online Assessment questions

  • Count Palindrome Addition ChoicesOA · Seen Nov 2026
  • Count Multiples of Three with Two SevensOA · Seen Oct 2026
  • Recursively Expanded Shell Command CountsOA · Seen Oct 2026
  • Rotate Matrix Regions Around the DiagonalsOA · Seen Oct 2026
  • Maximum Diamond SumOA · Seen Oct 2026
  • Smallest Most-Lit Street PositionOA · Seen Oct 2026
  • Rearrange String by Alternating EndsOA · Seen Sep 2026
  • Most Items Within Budget from a Start IndexOA · Seen Sep 2026
  • Count Fancy NumbersOA · Seen Sep 2026
  • Count Pieces After Othello MovesOA · Seen Sep 2026

Similar questions at other companies

  • Minimum Changes for Distinct Adjacent CharactersHeadlands Technologies · OAHeadlands Technologies interview questions
  • Theme Park Shuttle Wait TimeAirbnb · OAAirbnb interview questions
  • REST API: Country CodesHackerRank · OAHackerRank interview questions
  • Fill One Exact-Length Binary WindowAmazon · OA
  • Remove Vowels from a StringHSBC · OAHSBC interview questions
  • Branch with the Most FilesCapital One · OACapital One interview questions
  • Count User Mentions in Chat MessagesRamp · OARamp interview questions
  • Maximum Ones After K OperationsGoldman Sachs · OAGoldman Sachs interview questions
  • Total Each Letter's Count in an Encoded StringIBM · OAIBM interview questions
  • Robot Stops Left or Right (Forward Deployed Engineer)Boston Consulting Group · OABoston Consulting Group interview questions

Hudson River Trading interview experiences

  • Hudson River Trading Data Science Interviews: 2 Experiences
  • Hudson River Trading interviews · 2021
  • Hudson River Trading OA · 2021
  • Hudson River Trading interviews · 2022
  • Hudson River Trading OA · 2022
  • Hudson River Trading interviews · 2023
All Hudson River Trading interview questionsSee Hudson River Trading hiring insights
Saved
class Solution {
    public String convertIdentifiers(String text) {
      // write your code here
    }
}
Checking account…