classic_aad 0.0.2
SDKflutter
Platformandroidioswindowslinuxmacosweb
Common Algorithm and Data structure implemented in Dart such as Quick sort, Heap sort, .....
classic_aad
Common Algorithm and Data structure implemented in Dart
Contents
- classic_aad
Functions
Sort functions
Selection Sort
const unorderedList = [1, 3, 6, 5, 4, 2, 7, 9, 8];
const unorderedListDouble = [1.1, 3.1, 6.1, 5.1, 4.1, 2.1, 7.1, 9.1, 8.1];
// Selection sort
final selectionSorter = SelectionSorter();
print(selectionSorter.sortInt(unorderedList));
print(selectionSorter.sortDouble(unorderedListDouble));
Bubble Sort
const unorderedList = [1, 3, 6, 5, 4, 2, 7, 9, 8];
const unorderedListDouble = [1.1, 3.1, 6.1, 5.1, 4.1, 2.1, 7.1, 9.1, 8.1];
// Bubble sort
final bubbleSorter = BubbleSorter();
print(bubbleSorter.sortInt(unorderedList));
print(bubbleSorter.sortDouble(unorderedListDouble));
Insertion Sort
const unorderedList = [1, 3, 6, 5, 4, 2, 7, 9, 8];
const unorderedListDouble = [1.1, 3.1, 6.1, 5.1, 4.1, 2.1, 7.1, 9.1, 8.1];
// Insertion sort
final insertionSorter = InsertionSorter();
print(insertionSorter.sortInt(unorderedList));
print(insertionSorter.sortDouble(unorderedListDouble));
Merge Sort
const unorderedList = [1, 3, 6, 5, 4, 2, 7, 9, 8];
const unorderedListDouble = [1.1, 3.1, 6.1, 5.1, 4.1, 2.1, 7.1, 9.1, 8.1];
// Merge sort
final mergeSorter = MergeSorter();
print(mergeSorter.sortInt(unorderedList));
print(mergeSorter.sortDouble(unorderedListDouble));
Quick Sort
Heap Sort
const unorderedList = [1, 3, 6, 5, 4, 2, 7, 9, 8];
const unorderedListDouble = [1.1, 3.1, 6.1, 5.1, 4.1, 2.1, 7.1, 9.1, 8.1];
// Heap sort
final heapSorter = HeapSorter();
print(heapSorter.sortInt(List<int>.from(unorderedList)));
print(heapSorter.sortDouble(List<double>.from(unorderedListDouble)));
❌ Counting Sort
❌ Radix Sort
❌ Bucket Sort
Search functions
❌ Linear Search
❌ Binary Search
❌ Jump Search
❌ Interpolation Search
❌ Exponential Search
❌ Sublist Search
❌ Fibonaccu Search
❌ The ubiquitous Binary Search
Graph functions
Tree functions
String functions
Information
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.