pofk_algorithm 0.0.2 copy "pofk_algorithm: ^0.0.2" to clipboard
pofk_algorithm: ^0.0.2 copied to clipboard

discontinuedreplaced by: lunaris_engine

A fast, extensible Dart library for algorithms and data structures, offering search, sort, and AI utilities. Over 500 algorithms planned in future versions.

example/pofk_algorithm_example.dart

import 'package:pofk_algorithm/list_algorithms/binary_search.dart';

void main() {
  List<int> sortedNumbers = [1, 3, 5, 7, 9, 11, 13];
  int target = 777;

  int index = binarySearch<int>(sortedNumbers, target);

  if (index != -1) {
    print('🔍 Found $target at index $index');
  } else {
    print('❌ $target not found in the list');
  }

  //Strings:
  List<String> sortedWords = ['apple', 'banana', 'cherry', 'date'];
  int stringIndex = binarySearch<String>(sortedWords, 'cherry');

  print(stringIndex != -1 ? '🍒 Found at index $stringIndex' : '❌ Not found');
}
3
likes
0
points
68
downloads

Publisher

unverified uploader

Weekly Downloads

A fast, extensible Dart library for algorithms and data structures, offering search, sort, and AI utilities. Over 500 algorithms planned in future versions.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on pofk_algorithm