暂无描述

KarateChop.cs 1.1KB

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CodeKata.Katas { /// <summary> /// Karate Chop. /// </summary> /// <remarks> /// Implement a binary search routine (using the specification below) in the language and technique of your choice. /// Tomorrow, implement it again, using a totally different technique. /// Do the same the next day, until you have five totally unique implementations of a binary chop. /// /// (For example, one solution might be the traditional iterative approach, one might be recursive, /// one might use a functional style passing array slices around, and so on). /// </remarks> public class KarateChop { /// <summary> /// Chops the specified target. /// </summary> /// <param name="target">The target.</param> /// <param name="array">The array.</param> /// <returns>The index of the targetted number (-1 if not found).</returns> public static int Chop(int target, int[] array) { throw new NotImplementedException(); } } }