-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
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
Disambiguate "Priority Queue" instructions #38805
Conversation
I have blocked this for now. See the pinned code freeze issue |
Limitations removed on Coding Interview Prep Challenges. |
There's no hard and fast rule for PRs, but each commit should be 'atomic' in the sense that it should be reasonably small and easy to understand. In this case it seems better to have those separate, because one changes style, the other meaning. It would be easy to miss the typo fix in the middle of all the changes to indentation. As for this PR, I see that there's a reference to |
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.
I think that the changed you made to the instructions clears up everything. It could have been confusing for people just learning and I think that this will help them out good job!
@ojeytonwilliams Added assert(
(function () {
var test = new PriorityQueue();
test.enqueue(["David Brown", 2]);
var front1 = text.front();
test.enqueue(["Jon Snow", 1]);
var front2 = test.front();
test.dequeue();
test.enqueue(["A", 3]);
var front3 = test.front();
test.enqueue(["B", 3]);
test.enqueue(["C", 3]);
test.dequeue();
var front4 = test.front();
return (
front1 === "David Brown" &&
front2 === "Jon Snow" &&
front3 === "David Brown" &&
front4 === "A"
);
})()
); |
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.
@tywmick One of your test's testString
s had a typo which caused the test to fail. Please correct and test your code locally by changing to the curriculum directory and running the following command:
npm run test -- -g "Create a Priority Queue Class"
Once you have passed all the tests successfully, you can make a new commit with the fixed code.
Thank you.
...es/english/10-coding-interview-prep/data-structures/create-a-priority-queue-class.english.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Whoops, thanks for catching that, @RandellDawson! Tests passing now 👌🏼 Thanks for your help! |
LGTM @moT01 @ojeytonwilliams Merge if you agree. |
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.
LGTM @tywmick 🎉 Thanks for contributing to freeCodeCamp 🎉
I have added this solution to the guide as well 😄
* Disambiguate "Priority Queue" instructions * Add front() to solution * Add tests for front() method * Fix test typo Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Checklist:
Update index.md
)master
branch of freeCodeCamp.For future reference, should I have combined #38803, #38804, and this one into a single PR?