ProAlgos-Cpp: Mention time and space complexities in comments
For each algorithm, mention its time complexity and space complexity in the “description comment” of its implementation program.
The format for the “description comment” (which is written at the beginning) should be:
/*
<Name of algorithm>
-------------------
<Brief description>
Time complexity
---------------
O(...), where <description of variable(s)>
Space complexity
----------------
O(...), where <description of variable(s)>
*/
Following are the algorithms for which time and space complexity hasn’t been added yet:
- N-Queens
- Kadane
- Binary search
- Bubble sort
- Counting sort
- Insertion sort
- Merge sort
- Quick sort
- Selection sort
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (13 by maintainers)
Commits related to this issue
- Update description comments to match format Underline headings and remove trailing colons, as per the format in issue #8. — committed to ProAlgos/ProAlgos-Cpp by janos-laszlo 7 years ago
- Update description comments to match format Underline headings and remove trailing colons, as per the format in issue #8. — committed to eskeype/Algos by janos-laszlo 7 years ago
I think its a good idea to put this in the readme or coding guidlines.