Algorithm · Hudson River Trading · Medium
This problem is a variation of LeetCode’s “String to Integer (atoi)” (problem 8). If you haven’t solved that one yet, consider doing so first. Implement the function itoa that takes a 32‑bit signed integer n and returns its exact decimal string representation. The conversion must be done manually – you are not allowed to use any built‑in number‑to‑string helpers. The returned string should follow these rules: If n is negative, the result must start with a - character. If n…
Checking your access…