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 total_price
    FROM transactions
    WHERE Customer IS NOT NULL
    ORDER BY total_price DESC
    • -- Code Here
    • SELECT
    • *
    • SELECT total_price
    • FROM transactions
    • WHERE Customer IS NOT NULL
    • ORDER BY store, total_price DESC
    • ORDER BY total_price DESC
Code
Diff
  • -- Code Here
    
    select city_name, 
      sum(confirmed_cases) confirmed_cases , 
      sum(recovered_cases) recovered_cases, 
      sum(death_cases) death_cases
    from cases c
    join dati d
      on d.code = c.dati_code
    group by city_name
    order by confirmed_cases desc
    
      
    • -- Code Here
    • select
    • city_name,
    • select city_name,
    • sum(confirmed_cases) confirmed_cases ,
    • sum(recovered_cases) recovered_cases,
    • sum(death_cases) death_cases
    • from cases
    • join dati
    • on dati.code = cases.dati_code
    • from cases c
    • join dati d
    • on d.code = c.dati_code
    • group by city_name
    • order by confirmed_cases desc
Code
Diff
  • x=int
    • lambda x: int(x)
    • x=int
Code
Diff
  • #include <vector>    
    #include <numeric>
    
    int sum(std::vector<int>& v) {
       int len = v.size();
       return len == 0   ? -1
              : len == 1 ? v[0]
              : std::accumulate(v.begin(), v.end(), 0);
    }
    • #include <vector>
    • using namespace std;
    • #include <numeric>
    • int sum(vector<int>& v) {
    • int sum = 0;
    • for (vector<int>::iterator it = v.begin(); it != v.end(); ++it) {
    • sum += *it;
    • }
    • return sum;
    • int sum(std::vector<int>& v) {
    • int len = v.size();
    • return len == 0 ? -1
    • : len == 1 ? v[0]
    • : std::accumulate(v.begin(), v.end(), 0);
    • }
Code
Diff
  • module ExampleSolution
      let add = (+)
    • module ExampleSolution
    • let add a b = (+) a b
    • let add = (+)
Code
Diff
  • const isReadyToSale = (age, weight) => 
      (Number.isFinite(age) && Number.isFinite(weight)) &&
      (age > 30 && age < 100) && (weight > 1.5 && weight < 10)
    
    • function isReadyToSale(age , weight){
    • // Validasi input required
    • if(!age || !weight)
    • return false
    • // Validasi tipe data input harus number
    • if(!isNumber(age) || !isNumber(weight))
    • return false
    • // Validasi range umur
    • if(age < 0 || age > 100)
    • return false
    • // Validasi range berat
    • if(weight < 0 || weight > 10)
    • return false
    • // Validasi siap jual atau sebaliknya
    • if(age > 30 && weight > 1.5)
    • return true
    • else
    • return false
    • }
    • function isNumber(param){
    • return typeof param == `number`;
    • }
    • const isReadyToSale = (age, weight) =>
    • (Number.isFinite(age) && Number.isFinite(weight)) &&
    • (age > 30 && age < 100) && (weight > 1.5 && weight < 10)