Solving 'Roman to Integer' from LeetCode ( Easy ) - Problem solving in JS

preview_player
Показать описание
Buy me a coffee if this is useful 😀

I'm solving this problem in JS

* It's just a way for me to keep solving questions... *

My Profile :

Рекомендации по теме
Комментарии
Автор

Awesome solution ! I found out that map.I and map['I'] have the same value, which is 1. Very amazing, and I learned a lot. Thank U :)

georgeyxu
Автор

omg, this solution is great! Really helped me understand the problem!

tatianabowman
Автор

i did it differently and got 52mb of memory usage and just faster than 5%😂😂 I feel dumb af, but this is a silky solution. 🔥🔥

isakawilliam
Автор

sequence =

word =
"aaaba"

abhishektripathi
Автор

can you please explain this part " res -=map[num] & res+=map[num] "

TekkenRoom
Автор

I did this without arrow functions and got slower with more memory usage. Is this normal? does using arrow functions use less memory?

newtypetommy
Автор

Yeah don’t think you need .split but nice

chrismetsios