Leetcode, Roman To Integer, Scala, Programming, Algorithms.
this array does not depend on the input size but is fixed regardless of the input string’s length. No additional space that scales with the size of the input is used, hence the constant space complexity. Solution 3: Using Immutable Map for Flexibility Leveraging Scala’s immutable Map, this approach