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
  • -- Code Here
    SELECT name, age FROM customers;
    • --- Code Here
    • -- Code Here
    • SELECT name, age FROM customers;
Code
Diff
  • select * from customers
    
    
    • -- Code here
    • select * from customers
Code
Diff
  • def return_hundred():
        return 0xFF ^ 0x9B
    • def return_hundred():
    • return 10000000000000000000000000000000 - 9999999999999999999999999999900
    • return 0xFF ^ 0x9B
Recursion
Mathematics
Code
Diff
  • function fibonacci(n) {
        return n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2);
    }
    • function fibonacci(n) {
    • if (n <= 1) return n;
    • return fibonacci(n - 1) + fibonacci(n - 2);
    • return n <= 1 ? n : fibonacci(n - 1) + fibonacci(n - 2);
    • }
Code
Diff
  • fn flip_the_number(x: &u64) -> u64 {
        let reversed_str: String = x.to_string().chars().rev().collect();
        let reversed_u64: u64 = reversed_str.parse().unwrap();
        reversed_u64
    }
    • fn flip_the_number(x: &u64) -> u64 {
    • let mut x = *x;
    • let mut y = 0;
    • while x != 0 {
    • y = y * 10 + x % 10;
    • x /= 10;
    • }
    • y
    • let reversed_str: String = x.to_string().chars().rev().collect();
    • let reversed_u64: u64 = reversed_str.parse().unwrap();
    • reversed_u64
    • }

Refactor the previous function body to one line.

Code
Diff
  • function isEven(num) {
      return num % 2 === 0 ? true : num % 1 === 0 ? false : undefined;
    }
    // isEven(2);
    
    
    // Previous iteration
    
    // isEven = number => number %2 === 0 ? 
    //   true: number %1 === 0 ? 
    //   false : undefined;
    • isEven = number => number %2 === 0 ?
    • true: number %1 === 0 ?
    • false : undefined;
    • function isEven(num) {
    • return num % 2 === 0 ? true : num % 1 === 0 ? false : undefined;
    • }
    • // isEven(2);
    • // Previous iteration
    • // isEven = number => number %2 === 0 ?
    • // true: number %1 === 0 ?
    • // false : undefined;
Code
Diff
  • #include<iostream>
    
    int doubleValue(int x) {
        return x + x;
    }
    
    • #include<iostream>
    • int doubleValue(int x) {
    • return x * 2;
    • return x + x;
    • }
Code
Diff
  • float AreaOfTriangle(float w, float h) {return (w * h) * 0.5;}
    • float AreaOfTriangle(float w, float h) {return (w * h) / 2;} //Get one-lined
    • float AreaOfTriangle(float w, float h) {return (w * h) * 0.5;}
Code
Diff
  • const greet = () => 'Hello World!';
     
    
    • function Greet(){return "Hello World!"}
    • const greet = () => 'Hello World!';
Code
Diff
  • const removeEveryThird = str => str[0]+[...str].filter((a,i)=> i%3!==0).join('')
    • function removeEveryThird(str) {
    • return (str[0] || '') + str
    • .slice(1)
    • .replace(/(..)./g, '$1')
    • }
    • const removeEveryThird = str => str[0]+[...str].filter((a,i)=> i%3!==0).join('')