Day 3: Coding Challenge
Shraddha M Thakur
Software Developer | Actively Seeking Opportunities | Computer Applications Graduate | Passionate about Product Innovation
Problem - A Romal numeral is given as an input, we need to find the number in the output. There are certain symbols for selected numbers and condition is given for such Roman numeral where the number is written in Roman numeral as a larger number after a smaller number like IV.
Solution - We will use in this case Hashmap, to store the number and roman numeral as key and value. Also, we will compare the two characters of the array for checking the given condition.
Time Complexity - O(n)
Space Complexity - O(1)