Day 3: Coding Challenge

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)

#problemsolving #problemsolver #leetcode2023 #leetcodestreak #30daysofcodechallenge #30daysofcode #problemsolvingskills

要查看或添加评论,请登录

社区洞察

其他会员也浏览了