From 79af88a579036c05f758988115e916ad541bbb55 Mon Sep 17 00:00:00 2001 From: gamenowdotin <65381492+gamenowdotin@users.noreply.github.com> Date: Tue, 30 Jun 2020 06:28:08 +0530 Subject: [PATCH] Update README.md --- sorting-algorithms-in-javascript/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sorting-algorithms-in-javascript/README.md b/sorting-algorithms-in-javascript/README.md index c082ff4..3f18e5d 100644 --- a/sorting-algorithms-in-javascript/README.md +++ b/sorting-algorithms-in-javascript/README.md @@ -33,6 +33,8 @@ If you feel comfortable with the concept of each sorting algorithms and only wan The space complexity for Bubble Sort is O(1), because only a single additional memory space is required i.e. for temp variable. Also, the best case time complexity will be O(n), it is when the list is already sorted + + Stable: Stable sorting algorithms maintain the relative order of records with equal keys (i.e. values). That is, a sorting algorithm is stable if whenever there are two records R and S with the same key and with R appearing before S in the original list, R will appear before S in the sorted list.