Comments on: Bubble Sort – Algorithm, Source Code, Time Complexity https://www.happycoders.eu/algorithms/bubble-sort/ Fri, 02 May 2025 08:20:19 +0000 hourly 1 By: Admin https://www.happycoders.eu/algorithms/bubble-sort/#comment-39431 Fri, 14 Feb 2025 10:03:01 +0000 https://www.happycoders.eu/?p=14532#comment-39431 For any enquiries call here: 8459926235

]]>
By: Sven Woltmann https://www.happycoders.eu/algorithms/bubble-sort/#comment-34937 Wed, 25 Sep 2024 19:50:24 +0000 https://www.happycoders.eu/?p=14532#comment-34937 In reply to Dieter.

Hi Dieter,

in general, you need to count _all_ operations and then take the one with the highest time complexity.

But in this specific case, there must be at least one comparison for each swap, so the time complexity for swaps can't be higher than for comparisons.

Therefore, you're right, determining the time complexity for comparisons is enough!

]]>
By: Dieter https://www.happycoders.eu/algorithms/bubble-sort/#comment-34431 Mon, 16 Sep 2024 06:12:23 +0000 https://www.happycoders.eu/?p=14532#comment-34431 Hi Sven,

thanks for the article. It was very helpful.
A question:
For the counting of complexity do you count comparing or swapping operation?
To count comparisons should be enough, right?

]]>
By: your future wife https://www.happycoders.eu/algorithms/bubble-sort/#comment-27061 Fri, 10 May 2024 09:45:31 +0000 https://www.happycoders.eu/?p=14532#comment-27061 I love you from the bottom of my heart

]]>
By: your future wife https://www.happycoders.eu/algorithms/bubble-sort/#comment-27060 Fri, 10 May 2024 09:45:05 +0000 https://www.happycoders.eu/?p=14532#comment-27060 I love you

]]>
By: Linkon Saha https://www.happycoders.eu/algorithms/bubble-sort/#comment-18005 Fri, 16 Jun 2023 12:52:18 +0000 https://www.happycoders.eu/?p=14532#comment-18005 Thanks

]]>