Skip to content

Commit

Permalink
get_number - comment about default case
Browse files Browse the repository at this point in the history
we can throw in this case since leetcode question
description says all supposed to be valid roman letters
  • Loading branch information
Yacob (Kobi) Cohen-Arazi committed Jan 10, 2022
1 parent dd5a866 commit e8b442e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roman-to-integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace leetcode_roman_to_integer {
const auto c = s[idx];
switch (c) {
default:
return 0;
return 0; // per leetcode description, should not happen. we can throw...
case 'I':
result += get_special<'V', 'X'>(s[idx+1], 1, 4, 9, idx);
break;
Expand Down

0 comments on commit e8b442e

Please sign in to comment.