sortero 0.0.1 copy "sortero: ^0.0.1" to clipboard
sortero: ^0.0.1 copied to clipboard

A sorting library

Sortero #

Hecho en 🇵🇷 por Radamés J. Valentín Reyes

Import #

import 'package:sortero/sortero.dart';

Extensions: #

- Bubble sort: #

extension #

.bubbleSort()

Parameters #

  • compare: a function that takes as argument one item of a list and returns a number
  • reverseOrder: boolean value that determines the order in which stuff is sorted

Example #

Bubble sort #

List<num> algo = [4,6,3,7,8,9];
    algo.bubbleSort(
	compare: (a){
		return a;
	},
);
print(algo);

Bubble sort reverseOrder parameter #

List<num> algo = [4,6,3,7,8,9];
    algo.bubbleSort(
      compare: (a){
        return a;
      },
      reverseOrder: true,
    );
	print(algo);
});
0
likes
100
pub points
0%
popularity

Publisher

unverified uploader

A sorting library

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on sortero