Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
JS makes this so hard
What's the purpose of
lea rax,[rsi+rdi]
?Thanks!
How do you get the function argument in NASM? I've tried different things, but I can't find it. It's not in
eax
, it's not in or aroundesp
/rsp
that I can tell. I'm new to assembly, so any help would be very appreciated!Doesn't need itertools. I'm guessing you just forgot to remove it. It's too bad CodeWars doesn't let us edit our solutions
But then where in buffer will the char be put? Either buffer must be increased, or you need an index variable.
Edit: oh wait, you're saying in addition to.
This comment is hidden because it contains spoiler information about the solution
wtf lmao
loooool, this is definitely a problem that will require collections and multithreading
This creates a
Map<string, number>
(one entry per word), anumber[]
(that never holds more than 3 elements), astring[]
(that never holds more than 3 elements), and anotherstring[]
from filtering out the empty strings. I could have avoided the last one by not using filter, but I figured this was good enough. Unless I'm missing some easy optimization win, this is as optimal as is feasible to get in JS.This wastes memory (as many bytes as the number of vowels in the string).
This wastes memory (as many bytes as the number of vowels in the string)
This comment is hidden because it contains spoiler information about the solution
You probably forgot the import.
counts
is a method defined in theItertools
trait, and it's defined for all iterators (such asChars
, which is whatchars()
returns), but you have to import it to have access to it.Oh man, I explicitly checked itertools for a method like
counts
, but I was looking at the documentation for an old version.Loading more items...