Skip to content

🌊 - Richelle#4

Open
r-spiel wants to merge 6 commits intoAda-C14:masterfrom
r-spiel:master
Open

🌊 - Richelle#4
r-spiel wants to merge 6 commits intoAda-C14:masterfrom
r-spiel:master

Conversation

@r-spiel
Copy link

@r-spiel r-spiel commented Apr 17, 2021

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Richelle, you hit the learning goals, well done. Very clean code and well done.

Comment on lines +4 to 7
Time Complexity: O(n) worst case if all are opening brackets
Space Complexity: same as above
*/
const balanced = (str) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I love the use of the JS Object here as a hash.

Comment on lines +28 to 31
Time Complexity: O(n)
Space Complexity: O(n)
*/
const evaluatePostfix = (expr) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


enqueue(element) {
throw new Error("This method has not been implemented!");
enqueue(value) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


}

dequeue() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return data;
}

front() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 , you might also want to check to see if the queue is empty here.

return this.store[this.head];
}

size() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return count;
}

isEmpty() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants