Daily Leetcode Solution
54 comments
Caleb Akeju
9 hours ago
The challenging thing about this question is that you can do subtraction in roman numerals by placing a lesser number before a bigger one, so when you encounter such an arrangement you'd subtract the current from the whole res or you could just subtract current from the next and add it to the result. It's same thing. Otherwise, just add away. I folded the Romana Numeral/numbers hashtable to allow the solution be a single shot.
Caleb Akeju
9 hours ago
Turns out the way to check if all values in an array are thesame is to pick a random value and check against the whole array. In my case, I picked the first one.
Caleb Akeju
4 days ago
This question and solution eventually make sense after explanation from AI and writing it out repeatedly.