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
Strings
Ciphers
Fundamentals
Cryptography
Algorithms
Puzzles
Regular Expressions
Code
Diff
  • public class PasswordValidation {
      
      public static boolean validatePassword(String password) {
        // code here
        return false;
      }
      
    }
    • public class PasswordValidation {
    • public static boolean validatePassword(String password) {
    • // code here
    • return false;
    • }
    • }
Code
Diff
  • public class AbbreviateTwoWords {
    
      public static String abbrevName(String name) {
        return "%s.%s".formatted(name.charAt(0), name.charAt(name.indexOf(" ") + 1));
      }
    }
    • public class AbbreviateTwoWords {
    • public static String abbrevName(String name) {
    • return name.replaceAll("[^A-Z\\s]","").replaceAll("\\s",".");
    • return "%s.%s".formatted(name.charAt(0), name.charAt(name.indexOf(" ") + 1));
    • }
    • }
Puzzles
Code
Diff
  • def satisfaction(participants, start_offset, tour_length):
        overlap = tour_length // start_offset
        firsts = overlap * ((overlap + 1) / 2)
        return participants * overlap - firsts
    • def satisfaction(n, x, t):
    • start_times = [i * x for i in range(n)]
    • finish_times = [(i * x) + t for i in range(n)]
    • upset_factor = 0
    • for i, writer in enumerate(finish_times):
    • for j, others in enumerate(start_times):
    • if others <= writer and i < j:
    • upset_factor += 1
    • print(start_times, finish_times)
    • return upset_factor
    • def satisfaction(participants, start_offset, tour_length):
    • overlap = tour_length // start_offset
    • firsts = overlap * ((overlap + 1) / 2)
    • return participants * overlap - firsts
Code
Diff
  • import java.util.HashMap;
    import java.util.Map;
    
    public class Fibonacci {
    	private static Map<Integer, Long> memoizationMap = new HashMap<>();
    
    	public static long calcFibo(int n) {
        
        //SECOND
    		if (n <= 1) {
    			return n;
    		}
    
    		if (memoizationMap.containsKey(n)) {
    			return memoizationMap.get(n);
    		}
    
    		long fiboValue = calcFibo(n - 1) + calcFibo(n - 2);
    		memoizationMap.put(n, fiboValue);
    
    		return fiboValue;
    	}
    }
    • import java.util.HashMap;
    • import java.util.Map;
    • public class Fibonacci {
    • private static Map<Integer, Long> memoizationMap = new HashMap<>();
    • public static long calcFibo(int n) {
    • //SECOND
    • if (n <= 1) {
    • return n;
    • }
    • if (memoizationMap.containsKey(n)) {
    • return memoizationMap.get(n);
    • }
    • long fiboValue = calcFibo(n - 1) + calcFibo(n - 2);
    • memoizationMap.put(n, fiboValue);
    • return fiboValue;
    • }
    • }