Home > Karate-Chop

Karate-Chop

Karate-Chop is a project mainly written in Python, it's free.

Solution to the Karate Chop Code Kata

Karate Chop

This file is a Python solution to the Code Kata proposed by Dave Thomas.

The kata can be found here:

http://codekata.pragprog.com/2007/01/kata_two_karate.html

Within the file there are five seperate solutions to the problem posed in the kata.

They are:

  • Recursive Search
  • Iterative Search
  • Threaded Search
  • Traditional Binary Search
  • Tree Search

I am sure these are not the only solutions. They might not even be the best solutions.

I suggest you give the kata a try and see if you can't figure out a better way of solving it than I did.

Running unit tests

To run the unit tests and view that the solutions in the file work, simply run the file

python karateChop.py

Previous:TCP