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
2018-03-13 04:36:21 +05:30
2017-12-23 18:30:49 +01:00
2018-03-27 23:14:19 +02:00
2018-03-16 23:15:22 +01:00
2018-04-18 18:09:35 +05:30
2018-03-27 22:51:40 +02:00
2017-12-26 16:29:37 +05:30
2018-10-02 16:34:16 +05:30
2016-11-20 12:05:58 +05:30
2017-06-04 14:12:56 +05:30
2016-08-09 16:40:41 +05:30
2018-01-03 19:35:42 +01:00
2017-12-26 16:41:23 +05:30
2017-06-02 11:43:26 +05:30
2017-09-29 15:26:47 +02:00
2017-12-26 16:36:19 +05:30
2016-08-09 15:50:07 +05:30
2016-08-09 15:50:07 +05:30
2017-12-25 14:39:09 +05:30
2016-08-09 16:40:41 +05:30
2016-08-09 16:40:41 +05:30
2017-12-27 13:47:42 +01:00
2017-06-07 21:41:54 +05:30
2017-02-10 21:57:32 +05:30
2017-10-08 20:08:04 +05:30
2017-06-07 21:41:54 +05:30
2017-10-17 17:31:21 +02:00
2016-08-30 15:01:33 +05:30
2016-10-04 15:57:46 +05:30

C++

This repository contains some useful algorithms and data structures.

Contribute

How you can contribute? See this small guide.

  • Use the directory structure of the repository.
  • Please describe your pull requests.
  • Don't use bits/stdc++.h because this is quite Linux specific and slow down the compiler process.
  • Put in comments in your code.
  • Avoid struct uses instead the class keyword.
  • Add some test cases in the main-function.
Languages
C++ 98.6%
CMake 1.3%