-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding fix #1342 fixing docs for FenWickTree and DepthFirstSearch #1647
base: master
Are you sure you want to change the base?
Conversation
I fix docs of BreadthFirstTreeSearch it to be able to use jsdocs its part of solving #1342 |
…drome CheckPalindrome
…aNumerical,BeadSort,BogoSort,BubbleSort,CocktailShakerSort,CountinfSort,FindSecondsLargestElementSort,FisherYatesShuffle
…earch,ExponentialSearch,FibonacciSearch,InterpolationSearch,JumpSearch,LinearSearch,QuickSelectSearch,RabinKarp,StringSearch,TernarySearch
…' into fix-jsdocs
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1647 +/- ##
==========================================
- Coverage 84.07% 84.06% -0.01%
==========================================
Files 375 375
Lines 19688 20031 +343
Branches 2913 2914 +1
==========================================
+ Hits 16552 16840 +288
- Misses 3136 3191 +55 ☔ View full report in Codecov by Sentry. |
…-programming folder
|
||
/** | ||
* Comparator function to sort numbers in ascending order. | ||
* @param {number} num1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The three lines starting here are not useful.
@@ -6,6 +6,10 @@ | |||
*/ | |||
|
|||
// factorial utility method. | |||
/** | |||
* @param {Number} n | |||
* @returns {Number} the factiorial of n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: factiorial (I would also say this is self-explanatory, and since it's just a helper, doesn't need a comment; ideally this file should import the factorial implementation).
/** | ||
* | ||
* @param {Number} n | ||
* @returns {Number} count of numbers b/w 1 and n that are coprime to n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"b/w" is confusing. Please write "between" out. This should also be consolidated with the definition given above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many comments are not consolidated with existing comments. Consider
/*
* Given a string s, return all possible palindrome partitionings of s.
* Given a string s, return all possible palindrome partitionings of s.
* A palindrome partitioning partitions a string into palindromic substrings.
* A palindrome partitioning partitions a string into palindromic substrings.
* @see https://www.cs.columbia.edu/~sedwards/classes/2021/4995-fall/proposals/Palindrome.pdf
* @see https://www.cs.columbia.edu/~sedwards/classes/2021/4995-fall/proposals/Palindrome.pdf
*/
*/
/**
* Returns all possible palindrome partitionings of a given string.
* @param {string} s
* @returns {string[][]} - Array of arrays containing all possible palindrome partitionings.
*/
These should be one comment, not two. Redundant information should not be stated twice. You need to consolidate the new doc comments with existing comments.
There are also quite a few mostly redundant comments like * @param {Number} num1
. These are slightly helpful because they specify types (though the types may be clear from context, as in this case), but still are mostly noise. Please document what the parameters and return values are properly in these cases, or remove the comments entirely.
@@ -6,7 +6,9 @@ | |||
* https://www.mathsisfun.com/definitions/factor.html | |||
* | |||
*/ | |||
|
|||
/** | |||
* @param {Number} [number=0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not useful.
* | ||
* @param {Number} x | ||
* @param {Number} y | ||
* @returns {(string|number)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be explained; ideallly the errors should be thrown instead of returned.
@@ -14,6 +14,12 @@ | |||
import { findHCF } from './FindHcf' | |||
|
|||
// Find the LCM of two numbers. | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unhelpful comment
@@ -4,7 +4,10 @@ | |||
Source: https://en.wikipedia.org/wiki/Friendly_number | |||
See also: https://mathworld.wolfram.com/FriendlyNumber.html#:~:text=The%20numbers%20known%20to%20be,numbers%20have%20a%20positive%20density. | |||
*/ | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, this comment is unhelpful
know more
Describe your change:
Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.I fix docs of fenWickTree and DepthFirstSearch it to be able to use jsdocs its part of solving chore: fix / clean up jsdoc comments #1342