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
  • SELECT*FROM transactions 
    WHERE store='BIE Store Bandung' and total_price<= 100000;
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE store='BIE Store Bandung' and total_price<= 100000;
Code
Diff
  • -- Code here
    SELECT id, name, age, kota FROM customers WHERE kota = 'Tasikmalaya'
    • --- Code here
    • -- Code here
    • SELECT id, name, age, kota FROM customers WHERE kota = 'Tasikmalaya'
Code
Diff
  • select name as Nama, age as Umur from customers
    -- Code Here
    • select name as Nama, age as Umur from customers
    • -- Code Here
Code
Diff
  • SELECT name,age FROM customers
    • -- Code Here
    • SELECT name,age FROM customers
Code
Diff
  • -- Code here
    select * from customers
    • -- Code here
    • select * from customers
Code
Diff
  • const greet = () => 'Hello World!';
    • function Greet(){return "Hello World!"}
    • const greet = () => 'Hello World!';
Code
Diff
  • fn solution(mut x: i32) -> bool {
        x.to_string().chars().into_iter().position(|s| s == '3').map_or(false, |_| true)
    }
    
    /*
    fn solution(mut x: i32) -> bool {
        while x != 0 {
            if x - x/10 == 3 {
                return true;
            }
        }
        false
    }
    */
    • fn solution(mut x: i32) -> bool {
    • match x.to_string().chars().into_iter().position(|s| s == '3') {
    • Some(_t) => true,
    • _e => false,
    • x.to_string().chars().into_iter().position(|s| s == '3').map_or(false, |_| true)
    • }
    • /*
    • fn solution(mut x: i32) -> bool {
    • while x != 0 {
    • if x - x/10 == 3 {
    • return true;
    • }
    • }
    • }
    • false
    • }
    • */
Code
Diff
  • meaning_of_life_is = lambda: "Hello World!"
    • def meaning_of_life_is():
    • return """
    • go crazy with your imagination and return anything you like.
    • strings, numbers, ... just don't return None.
    • may the most creative answer win
    • """
    • meaning_of_life_is = lambda: "Hello World!"

Design an algorithm that accepts a positive integer and reverses the order of its digits.

Code
Diff
  • def reverse_int(int)
      int.to_s.reverse.to_i
    end
    • public class Algorithms {
    • public static int reverseInt(int n) {
    • int reversed = 0;
    • while(n != 0){
    • reversed = reversed * 10 + (n % 10);
    • n /= 10;
    • }
    • return reversed;
    • }
    • }
    • def reverse_int(int)
    • int.to_s.reverse.to_i
    • end
Mathematics
Algorithms
Logic
Numbers
Code
Diff
  • def prime_checker(n):
        if n in [2, 3, 5]:
            return True
        elif n % 2 == 0 or n % 3 == 0 or n % 5 == 0:
            return False
        
        a = int(n ** 0.5 / 30)
        b = [7, 11, 13, 17, 19, 23, 29, 31]
        
        for i in [30 * j for j in range(a + 1)]:
            if True in [n % (i + q) == 0 for q in b if i + q is not n]:
                return False
        return True 
    • """
    • https://en.wikipedia.org/wiki/Primality_test
    • This one has lesser tests or usage of % operator.
    • An alternative using primality mod 30 = 2 * 3 * 5 instead of 6 = 2 * 3
    • """
    • def prime_checker(n):
    • if n in [2, 3, 5]:
    • return True
    • elif n % 2 == 0 or n % 3 == 0 or n % 5 == 0:
    • return False
    • a = int(n ** 0.5 / 30)
    • b = [7, 11, 13, 17, 19, 23, 29, 31]
    • for i in [30 * j for j in range(a + 1)]:
    • if True in [n % (i + q) == 0 for q in b if i + q is not n]:
    • return False
    • return True