SearchAlgorithms class

A class that provides various search algorithms.

Constructors

SearchAlgorithms()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

binarySearch({required List<String> list, required String target, bool isSorted = false}) int
Binary search: searches the list using divide and conquer approach.
jumpSearch({required List<String> list, required String target, bool isSorted = false}) int
Jump search: searches the list by jumping ahead by a fixed step size.
linearSearch(List<String> list, String target) int
Linear search: searches the list sequentially for the target element.