Algorithm · Microsoft · Medium
Parse Base Integer Medium · String, Math, Parsing · Microsoft · Before accumulating each digit, check the magnitude against the sign‑dependent bound; syntax errors always take priority over overflow. Write a function parse_base_integer(text: string, base: int) -> string that converts a string representation of a signed integer in the given base into its decimal string. The function must return: the decimal string of the value — when the input is syntactically correct and the…
Checking your access…