Programming Question: Leetcode — 12

Raj shukla
Mar 31, 2021

Approach to solve leetcode 12 question — Integer to Roman

  1. This question is quite easy to solve , we just have to declare mappings properly .
  2. After that, we will loop through the mapping and keep decrementing number if it exists in mapping and simultaneously adding corresponding roman into the result.
  3. return the result in end

Code:

--

--