Skip to content

Space - Shonda #1

Open
Shonda860 wants to merge 2 commits intoAda-C13:masterfrom
Shonda860:master
Open

Space - Shonda #1
Shonda860 wants to merge 2 commits intoAda-C13:masterfrom
Shonda860:master

Conversation

@Shonda860
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@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 Shonda, you hit all the learning goals here. Very well done on the circular buffer.

Let me know what questions you have on my comments.

Comment thread lib/problems.js
Comment on lines 16 to +17
const balanced = (str) => {
throw new Error("This method has not been implemented!");
}
const stack = [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 Good use of a JS object as a hash!

Comment thread lib/problems.js
Comment on lines +12 to 16
Time Complexity: O(n)
Space Complexity: O(n)
*/

const balanced = (str) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread lib/problems.js
Comment on lines +73 to +74
const expr = "35+6*";
console.log(evaluatePostfix(expr));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
const expr = "35+6*";
console.log(evaluatePostfix(expr));

Comment thread lib/problems.js
Comment on lines +42 to 45
Time Complexity: O(n)
Space Complexity: O(n) n for stack
*/
const evaluatePostfix = (expr) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread lib/queue.js
dequeue() {
throw new Error("This method has not been implemented!");
}
dequeue() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread lib/queue.js
enqueue(element) {
throw new Error("This method has not been implemented!");
// enqueue(value) - Adds the value to the back of the queue.
enqueue(element) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread lib/queue.js
Comment on lines +32 to +34
size() {
return this.length;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This should really return the number of elements in the Queue not the size of the underlying data structure.

Comment thread lib/queue.js
Comment on lines +37 to +41
isEmpty() {
return (
this.store[this.head] === undefined || this.store[this.head] === null
);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread lib/stack.js
Comment on lines +2 to 3

class Stack {
Copy link
Copy Markdown

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