filmov
tv
Top Algorithm Interview Questions Fully Explained: Convert Roman numbers to Int

Показать описание
Roman numbers are written using I (1), V (5), X(10), ... and in this question we are going to convert them to the Arabic or Integer numbers we know. So XVII should return 17 but there is a catch! If an I, V, .. comes BEFORE a larger sign, we should decrease the value; so IV is 4 and XIV is 14.