-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat: StableMatching Algorithm #1446
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
feat: StableMatching Algorithm #1446
Conversation
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.
Needs to be properly separated into implementation with an export
ed function (+ JSDoc comment) and tests. There should be no console.log
. This should not be operating on a global state - rather, it should be made reusable. I also don't see how this belongs into backtracking. (There is no need to create a class, though.)
Code-wise, the implementation looks like it may be correct, but is needlessly inefficient. This algorithm can be implement in O(n2) by making each loop iteration constant time, you just need to be careful with your data structures. This implementation is probably at least O(n3) because of all the linear searches it does though.
Open in Gitpod know more
Describe your change:
Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.