Begin a new Kumite
Search
About
  • Filter by Language:
  • Kumite (ko͞omiˌtā) is the practice of taking techniques learned from Kata and applying them through the act of freestyle sparring.

    You can create a new kumite by providing some initial code and optionally some test cases. From there other warriors can spar with you, by enhancing, refactoring and translating your code. There is no limit to how many warriors you can spar with.

    A great use for kumite is to begin an idea for a kata as one. You can collaborate with other code warriors until you have it right, then you can convert it to a kata.

not sure what this is...

function compute() {
  return 1;
}

It's easier ;-)

Code
Diff
  • intertwine=a=> a.split('').sort().join('')
  • 1-intertwine=a=>[...a.slice(-a.length/2)].map((e,i)=>a[i]+e).join``
    1+intertwine=a=> a.split('').sort().join('')
Code
Diff
  • const ageSumDigits = (age1, age2, age3) => {
      return (age1+'').split('').map(n => parseInt(n)).reduce((n, m) => n + m) < age2 + age3;
    }
  • 11 const ageSumDigits = (age1, age2, age3) => {
    2- const sumOfDigits = num => [...`${num}`].reduce((sum,digit) => sum+Number(digit),0);
    3- return sumOfDigits(age2)+sumOfDigits(age3) > sumOfDigits(age1);
    2+ return (age1+'').split('').map(n => parseInt(n)).reduce((n, m) => n + m) < age2 + age3;
    44 }
Code
Diff
  • const specialSort = arr =>
      arr.reduce((r,_,i,s) => i%2 ? [...r, s[s.length-1-(i-1)/2]] : [...r,s[i/2]], [])
  • 1-def special_sort(list):
    2- r = []
    3- l = len(list)
    4- for i in range(l // 2 + 1):
    5- if i == 0 or (i == l // 2 and not l % 2):
    6- r.append(list[i])
    7- else: r.extend([list[-i], list[i]])
    8- return r
    1+const specialSort = arr =>
    2+ arr.reduce((r,_,i,s) => i%2 ? [...r, s[s.length-1-(i-1)/2]] : [...r,s[i/2]], [])