Create a Pull Request for this exercise

Create 2 functions:

  • Encode(n int) (string, bool) - takes an integer as its parameter and returns a string containing the Roman numeral representation of that integer.
  • Decode(s string) (int, bool) - takes a Roman numeral as its argument and returns its value as a numeric decimal integer.

Second bool parameter must be false if Encode/Decode is unable.


// MCMXC, true

// 2008, true

Run tests with benchmarks

go test -bench .