How to Convert Roman Numerals to Integer

In this post, I will be solving one of the interesting and easy algorithmic questions that appeared in the February 2021 Leetcode Monthly challenge.

PROBLEM STATEMENT
Given the following Roman symbols and their integer representations, write an algorithm to convert Roman Numerals to Integer;

Symbol       Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000