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
  • from itertools import chain
    
    def intertwine(text):
        half = len(text) // 2
        return "".join(chain.from_iterable(zip(text[:half], text[half:])))
    • from itertools import chain
    • def intertwine(text):
    • half = len(text) // 2
    • return "".join(["".join(pair) for pair in zip(text[:half], text[half:])])
    • return "".join(chain.from_iterable(zip(text[:half], text[half:])))
Code
Diff
  • function returnhundred(k = 0) {
      let random = function(max){return Math.floor(Math.random() * Math.floor(max))}
      
      let base = Math.pow('\n'.charCodeAt(), Math.pow(null, null) + '\n'.length);
      
      if (k == base) return k;
      return k > base ? returnhundred(k - random(base)) : returnhundred(k + random(base));
    }
    • function returnhundred() {
    • return Number('Ā'.charCodeAt(0).toString(16));
    • function returnhundred(k = 0) {
    • let random = function(max){return Math.floor(Math.random() * Math.floor(max))}
    • let base = Math.pow('\n'.charCodeAt(), Math.pow(null, null) + '\n'.length);
    • if (k == base) return k;
    • return k > base ? returnhundred(k - random(base)) : returnhundred(k + random(base));
    • }
Code
Diff
  • def common_substring(string, sub_str):
        value = sub_str in string
        return value
    • from re import search
    • def common_substring(string, sub_str):
    • if search(sub_str, string):
    • return True
    • return False
    • value = sub_str in string
    • return value
Code
Diff
  • add = lambda *args : args[0]+args[1]
    • add = lambda *_ : sum(_)
    • add = lambda *args : args[0]+args[1]
Fundamentals
Mathematics
Algorithms
Logic
Numbers
Strings
Data Types
Code
Diff
  • function maximumEvenNumber(text) {
      text = [...new Set(text.match(/\d/g))].sort().reverse()
      var end = text.filter(a => a % 2 == 0).slice(-1)
      return end[0] ? +(text.join``.replace(end, '') + end) : -1
    }
    • def maximum_even_no(string):
    • list1=[]
    • list2=[]
    • for i in string:
    • if(i.isdigit()):
    • list1.append(i)
    • list1=list(dict.fromkeys(list1))
    • list2=sorted(list1,reverse=True)
    • if(int(list2[-1])%2==0 or int(list2[-1])==0):
    • return int("".join(list2))
    • list3=range(len(list2))
    • list3=sorted(list3,reverse=True)
    • for j in list3:
    • if(int(list2[j])%2==0):
    • temp=list2.pop(j)
    • list2.append(temp)
    • break
    • result="".join(list2)
    • if(int(result)%2==0):
    • return int(result)
    • else:
    • return -1
    • function maximumEvenNumber(text) {
    • text = [...new Set(text.match(/\d/g))].sort().reverse()
    • var end = text.filter(a => a % 2 == 0).slice(-1)
    • return end[0] ? +(text.join``.replace(end, '') + end) : -1
    • }