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.
because count is an object. the ternary operation is checkin if the property (key: value) is in the count object already. if yes, it adds 1 to the stored value, if not it sets/adds the property.
so if string = 'example', the first run is going to see that count is empty, so count['e'] doesn't exist, and it will set count[e] = 1. then you have count = {e: 1}.
wow, this is pretty dumb by me lol. boo
hm, i see now that my code is redundant
hahaha, we're all here to learn. i didn't even realize.
hm, i can get the test cases but i haven't figured out what to do in certain cases yet.
definitely make sure to read it carefully and compare your output with the example.
had fun figuring it out, have a lot to learn from the solutions!
haha, i tried to do this and didn't really pull it off (slightly different way)
pretty fun, would like to revisit to see if i can do it better
good bc it forces you to try to use math due to the test cases.
tried a few ways to get this to work with powershell...but the code wants \n and pwsh uses `n. moving on.