-
-
Notifications
You must be signed in to change notification settings - Fork 429
Open
Description
Issue Proposal: Roman to Integer (LeetCode Problem 13)
Description
I would like to contribute an optimized and efficient C++ solution for the problem Roman to Integer (LeetCode Problem 13).
Plan of Contribution
- Implement a clean and readable C++ solution.
- Time complexity: O(n)
- Space complexity: O(1)
- Use an
unordered_map<char, int>
to store Roman numeral values. - Traverse the string from right to left:
- If the current numeral is less than the previous one, subtract it.
- Else, add it.
- Include meaningful comments and example test cases.
Example Output
For input: "MCMXCIV"
The output will be: 1994
Request
Please let me know if this contribution is acceptable and if there's a preferred folder structure or coding style I should follow.
Looking forward to your response! ✨
Thanks,
Rudraksh (GitHub: @rudrakshtank)
Metadata
Metadata
Assignees
Labels
No labels