• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
October 05, 2023 |2.6K Views
PROBLEM OF THE DAY: 04/10/2023 | Roman Number to Integer
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddhartha Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Strings but will also help you build up problem-solving skills.

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

Give the problem a try before going through the video. All the best!!!

Problem Link: https://practice.geeksforgeeks.org/problems/roman-number-to-integer3201/1
Solution IDE LInk: https://ide.geeksforgeeks.org/online-cpp-compiler/f9298846-8540-4fee-8925-0ecf666c0865