searching 1.0.0

Array searching

Linux macOS Windows



Description

Array searching module. This module provides Linear search and Binary search.

Installation
Use Dima to install or update this module:
$ dima install searching


Usage Example
import searching
 
data = [2, 9, 10, 23, 5, 1, 12, 8]
key = 12
 
index = search(key, data)
 
if index != -1
    writeln("Found at index " & index)
else
    writeln("Not found!")
endif


Module Info
Author: @faruq (Muhammad Faruq Nuruddinsyah)
URL: https://dinfio.org/
Documentation: Module Reference
Updated on: 30 May 2021