From dec247b04b4991906cf7e25f459d5a31bdccd3da Mon Sep 17 00:00:00 2001 From: ShyamPandit3107 <91066621+ShyamPandit3107@users.noreply.github.com> Date: Thu, 6 Oct 2022 04:43:23 +0530 Subject: [PATCH] enh(en): documentation in bubble sort (#868) I add the space Complexity also --- docs/en/Sorting/Bubble-Sort.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en/Sorting/Bubble-Sort.md b/docs/en/Sorting/Bubble-Sort.md index a917c6af..43fd563f 100644 --- a/docs/en/Sorting/Bubble-Sort.md +++ b/docs/en/Sorting/Bubble-Sort.md @@ -1,7 +1,9 @@ # Bubble Sort -Bubble Sort also known as Sinking Sort is the simplest sorting algorithm. It swaps the numbers if they are not in correct order. The Worst Case Time Complexity is O(n^2) - +Bubble Sort also known as Sinking Sort is the simplest sorting algorithm. It swaps the numbers if they are not in correct order. +The Worst Case - +Time Complexity : O(n^2) +Space Compldxity : O(1) i.e it use constant space. ## Steps 1. Compares the first element with the next element.