Commit Graph

8 Commits

Author SHA1 Message Date
mertkoca
0b5dde0ebb Update Bubble Sort.cpp
About Bubble Sort, bubble sort's working principle, algorithm analysis, best-worst case, such as information has been added. A person entering this pull request can easily learn about bubble sort.
In addition, information about the swap process used in the algorithm is also included in the code how to work. To make this process is fully explained in the lower example is explained in the sample. In some places, design changes were made to make it look pleasing to the eye.
2019-05-17 16:28:23 +03:00
mertkoca
ab60bdb062 Bubble Sort(Kabarcık Sıralama)
Bubble Sort(Kabarcık Sıralama) hakkkında bubble sort'un çalışma prensibi,algoritma analizi,en iyi-en kötü durum gibi bilgiler eklenmiştir.Bu pull request'e giren bir kişi bubble sort hakkında kolayca bilgi edinebilir.
Ayrıca algoritmada kullanılan swap işlemi hakkında da kod içinde nasıl çalıştığı bilgisi eklenmiştir.Bu işlemi tam anlaşılır hale getirmek içinde alt kısımda örnekle açıklanmıştır.Kod içinde de bazı yerlerde göze hoş gözükmesi için dizayn değişiklikleri yapıldı.
2019-05-14 14:08:21 +03:00
Ashwek Swamy
e18fe9f740 Update Bubble Sort.cpp 2019-02-09 13:25:57 +05:30
Ashwek Swamy
31abf60bc6 Merge branch 'master' into master 2019-02-09 13:25:12 +05:30
William Grigor
672f9dc57f Bubble Sort now uses vectors 2018-12-21 23:01:52 -06:00
Vaibhav Gupta
f499342869 Optimize bubble sort algorithm
-introduced variable 'swap' for 'outer-for-loop' of bubble sort algorithm. If it remains zero after executing inner-loop, it means array is sorted, hence it does not need to run for n^2 times.
- 'for(int j=0; j<n-1-i; j++)', as after each step, one number reaches to its right position. Thus inner loop does not need to run for 'n' times in every cycle.
2018-10-02 16:34:16 +05:30
Shivam Singhal
2a0c019573 Your branch is up-to-date with 'origin/master'. 2017-05-27 18:10:04 +05:30
AnupKumarPanwar
1c1746bc64 Sorting 2017-02-20 09:08:44 +05:30