Start a new Kumite
AllAgda (Beta)BF (Beta)CCFML (Beta)ClojureCOBOL (Beta)CoffeeScriptCommonLisp (Beta)CoqC++CrystalC#D (Beta)DartElixirElm (Beta)Erlang (Beta)Factor (Beta)Forth (Beta)Fortran (Beta)F#GoGroovyHaskellHaxe (Beta)Idris (Beta)JavaJavaScriptJulia (Beta)Kotlinλ Calculus (Beta)LeanLuaNASMNim (Beta)Objective-C (Beta)OCaml (Beta)Pascal (Beta)Perl (Beta)PHPPowerShell (Beta)Prolog (Beta)PureScript (Beta)PythonR (Beta)RacketRaku (Beta)Reason (Beta)RISC-V (Beta)RubyRustScalaShellSolidity (Beta)SQLSwiftTypeScriptVB (Beta)
Show only mine

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.

Ad
Ad
Code
Diff
  • def verify_sum(a, b):
        if a and b:
            return sum(map(ord, a)) == sum(map(ord, b))
    • def verifySum(s1, s2):
    • if not s1 or not s2:
    • return None
    • else:
    • return len(s1) == len(s2)
    • def verify_sum(a, b):
    • if a and b:
    • return sum(map(ord, a)) == sum(map(ord, b))
Code
Diff
  • class fizzbuzz {
      public static String ts(int num){
        if(num % 3 == 0 && num % 5 != 0)
          return "Fizz";
        if(num % 3 != 0 && num % 5 == 0)
          return "Buzz";
        if(num % 3 == 0 && num % 5 == 0)
          return "FizzBuzz";
        return String.valueOf(num);
      }
    }
    • def fizzBuzz(num):
    • return 'Fizz' *(not num % 3) + 'Buzz' *(not num % 5) or str(num)
    • class fizzbuzz {
    • public static String ts(int num){
    • if(num % 3 == 0 && num % 5 != 0)
    • return "Fizz";
    • if(num % 3 != 0 && num % 5 == 0)
    • return "Buzz";
    • if(num % 3 == 0 && num % 5 == 0)
    • return "FizzBuzz";
    • return String.valueOf(num);
    • }
    • }
Code
Diff
  • highAndLow=a=>Math.max(...a=a.split` `)+` `+Math.min(...a)
    • public class Kumite {
    • public static String highAndLow(String numbers) {
    • String[] integerStrings = numbers.split(" ");
    • int maxValue = Integer.parseInt(integerStrings[0]);
    • int minValue = Integer.parseInt(integerStrings[0]);
    • for (int i = 1; i < integerStrings.length; i++){
    • int number = Integer.parseInt(integerStrings[i]);
    • if(number > maxValue){
    • maxValue = number;
    • }
    • if(number < minValue){
    • minValue = number;
    • }
    • }
    • return Integer.toString(maxValue) + " " + Integer.toString(minValue);
    • }
    • }
    • highAndLow=a=>Math.max(...a=a.split` `)+` `+Math.min(...a)
Code
Diff
  • yeet_words=t=>t.replace(/\b\w{4,}\b/g,x=>(x<'a'?'Y':'y')+'e'.repeat(x.length-2)+'t')
    • def yeet_words(sentence)
    • yeeted = []
    • for word in sentence.split(' ') do
    • new_word = nil
    • l = word.match(/\w+/)[0].length
    • if l > 3
    • yeet = 'y' + 'e' * (l - 2) + 't'
    • new_word = word.gsub(/\w+/, yeet)
    • end
    • new_word = new_word.nil? ? word : new_word
    • yeeted << new_word
    • end
    • yeeted.join(' ').capitalize()
    • end
    • yeet_words=t=>t.replace(/\b\w{4,}\b/g,x=>(x<'a'?'Y':'y')+'e'.repeat(x.length-2)+'t')

Let's golf ;-)

Code
Diff
  • palindrome=s=>[...l=s.toLowerCase()].reverse().join``==l
    • const palindrome = (s = '') => s.toLowerCase().split('').reverse().join('') === s.toLowerCase()
    • palindrome=s=>[...l=s.toLowerCase()].reverse().join``==l