SearchingTechniques 0.4

SearchingTechniques 0.4

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jul 2017

Maintained by Abdullah Selek.



  • By
  • Abdullah Selek

searching-techniques

Different searching techniques with Objective-C.

Requirements

iOS 9.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+

Example Usage

Linear Search

STLinearSearch *linearSearch = [[STLinearSearch alloc] initWithDataSet:@[@"1", @"2", @"3", @"5", @"6", @"7"]];
int index = [linearSearch search:@"2"];

Binary Search

STBinarySearch *binarySearch = [[STBinarySearch alloc] initWithDataSet:@[@10, @8, @3, @4, @5, @6, @9, @7];
int index = [binarySearch search:@5];

Interpolation Search

STInterpolationSearch *interpolationSearch = [[STInterpolationSearch alloc] initWithDataSet:@[@10, @8, @3, @4, @5, @6, @9, @7]];
int index = [interpolationSearch search:5];