Skip to content

Instantly share code, notes, and snippets.

View malibayram's full-sized avatar
🏠
Working from home

M. Ali Bayram malibayram

🏠
Working from home
  • DersHub
  • Turkey
View GitHub Profile
@malibayram
malibayram / merge_sort.dart
Created February 25, 2022 22:46 — forked from Tomic-Riedel/merge_sort.dart
An implementation of MergeSort in Dart
List<int> mergeSort(List<int> array) {
// Stop recursion if array contains only one element
if(array.length <= 1) {
return array;
}
// split in the middle of the array
int splitIndex = array.length ~/ 2;