Skip to content

Commit be00981

Browse files
add merge sort logic for sorting
1 parent 2465270 commit be00981

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/core/resources/strings_manager.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ class StringsManager {
3030
static const String searching = "Searching";
3131
static const String sorting = "Sorting";
3232
static const String bubbleSort = "Bubble sort";
33-
static const String selectionSort = "Selection sort";
3433
static const String insertionSort = "Insertion sort";
34+
static const String selectionSort = "Selection sort";
35+
static const String mergeSort = "Merge sort";
3536

3637
static const String stop = "Stop";
3738
static const String play = "Play";

lib/features/sorting/base/view/sorting_list_page.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ class SortingListPage extends StatelessWidget {
4545
context.pushTo(Routes.selectionSort);
4646
},
4747
),
48+
CustomRoundedElevatedButton(
49+
roundedRadius: 3,
50+
backgroundColor: ThemeEnum.whiteD5Color,
51+
child: const RegularText(StringsManager.mergeSort),
52+
onPressed: () {
53+
context.pushTo(Routes.mergeSort);
54+
},
55+
),
4856
],
4957
),
5058
),

0 commit comments

Comments
 (0)