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
public class Kata {
  public static boolean[] populateBathroom(boolean[] urinals, int numOfPeople) {
    // Implement the urinal problem, described as "given x number of people walking 
    // into a bathroom that contains y number of urinals, describe the optimate
    // placement of people so that none is standing next to the other"
    // In this case, the urinals are represented by a boolean array with 
    // true representing a person at a urinal, and false meaning the urinal is empty
    return new boolean[] {true, false, true};
  }
}
const parse = (value = '') => {
  // if valid email, return true, else return false
  return true;
}

this is a test

def multiply(a, b):
    return a * b
function find_unique_items(array1, array2) 
{
  //Find the unique elements from two arrays
  return [1,2,4,6,8]
}
Tables
Data Structures

So basically turn an integer into a table of all the numbers from zero to that number

def int_to_table(num):
    tab = []
    for x in range(num + 1):
        tab.append(x)
    print(tab)
    return tab
public class FizzBuzz
{
    public string GetOutput(int number) {
      // Fizz buzz is a popular computer science interview question.  
      // The function above is given a number - if the number is
      // divisible by 3, return "fizz", if it's divisible by 5, 
      // return "buzz", if not divisble by 3 or 5 - return the
      // number itself.
      return "0";
    }
}

Description:
Your task is to remove every third char in a string,
using a zero based index

Example:

removeEverySecond('hello world'); // 'heloword'
removeEverySecond('how you doing') // 'howyoudoin'

function removeEveryThird(str) {
  // Remove the third character from every work in the string
  // using a zero based index
  return 'heloword';
}

Description:
Given an expression as a string, calculate its value. For example, given the string "1+2+3", return 6.

Order of operations should be respected: multiplication happens before addition.

Possible avenues for future exploration:

Adding support for subtraction and division
Stripping whitespace
Adding support for brackets

using System;
using System.Linq;

public class ArtihmeticParser
{
  public static int Evaluate(string input)
  {
    return input.Split("+").Select(EvaluateProduct).Aggregate(0,(a,b) => a+b);
  }
  
  private static int EvaluateProduct(string input)
  {
    return input.Split("*").Select(EvaluateInteger).Aggregate(1,(a,b) => a*b);
  }
  
  private static int EvaluateInteger(string input)
  {
    return int.Parse(input);
  }
}
// Write a project that demonstrates inheritance in C#

Guess my age according to my birth year if we live in 2021 :)

const myAge = function(birthYear) {
  // Your Code Here
  
}