This is a part of String section under GFG SDE Sheet.
In this problem, we are given a string in roman no format (s) your task is to convert it to an integer . Various symbols and their values are given below.
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
Example :
Input:
s = V
Output: 5
Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!
Do check out:-
Article: https://www.geeksforgeeks.org/converting-roman-numerals-decimal-lying-1-3999/
Problem: https://www.geeksforgeeks.org/problems/roman-number-to-integer3201/1
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/