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.
Just changing max fn right , hahaha
Thx.
i
should equal1
, there is no reason to comparearr[0]
to itself.O(nlogn)
Just wanted to fix the tests and try this kumite thing oout ;)
It goes to minus infinity, math logarithmic expressions look if you want
Additional test cases added
If you want to use totally inefficient approach, then yes, you can.
you can also do it like ;
findMax = a => a.sort((x, y) => x - y ).pop()
thanks
What if numners are all negative
Well, the code you provided actually counts how many of each char there was. But nvm, it's fine.
i thought that kumite is trying to find max value in a string...was my idea
What does this have to do with this kumite? :/
let s = 'lollipooooop';
var result = [...s].reduce((a, e) => {
a[e] = a[e] ? a[e] + 1 : 1;
return a
}, {});
console.log(result);
Loading more items...