FastPrepInteger to String Without Built-ins
Problems/Integer to String Without Built-ins

Integer to String Without Built-ins

Hudson River Trading logoHudson River Trading● EasyFULLTIMEPHONE SCREEN
QuestionFunctionExamplesConstraints

Problem statement

Complete the function below. The function receives the full standard input as a single string and returns the exact standard output lines.

Problem Implement itoa: given signed 32-bit integers, convert each integer to its base-10 string representation without using built-in number-to-string conversion helpers.

For each input integer, output the converted decimal string. Negative numbers must include a leading -. The value 0 must return 0.

Function

solveIntegerToString(input: String) → String[]

Complete solveIntegerToString. It has one parameter, String input, containing one signed integer per line. Return the stdout payload as an array of lines, without trailing newline characters.

Examples

Example 1

input = "0\n42\n-17\n2147483647\n-2147483648"return = ["0","42","-17","2147483647","-2147483648"]

Each integer is converted to its exact decimal string representation.

Constraints

  • Each value fits in a signed 32-bit integer.

More Hudson River Trading problems

  • Format a Signed Integer with CommasPHONE SCREEN · Seen Nov 2026
  • Order and Batch Open-Close LifecyclePHONE SCREEN · Seen Nov 2026
  • Count Palindrome Addition ChoicesOA · Seen Nov 2026
All Hudson River Trading interview questionsSee Hudson River Trading hiring insights
Saved
class Solution {
    public String[] solveIntegerToString(String input) {
        // write your code here
    }

}
Checking account…