-
Notifications
You must be signed in to change notification settings - Fork 6
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
Aeron Roemer - Rock #1
base: master
Are you sure you want to change the base?
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.
Nice work Aeron, you hit the learning goals here. Your code was clear and easy to read as well as efficient. Well done.
Time Complexity: O1 | ||
Space Complexity: O1 | ||
*/ | ||
getFirst() { |
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.
👍
Time Complexity: O1 | ||
Space Complexity: O1 | ||
*/ | ||
addFirst(value) { |
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.
👍
Time Complexity: On | ||
Space Complexity: O1 | ||
*/ | ||
search(value) { |
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.
👍
Time Complexity: On | ||
Space Complexity: O1 | ||
*/ | ||
length() { |
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.
👍
Time Complexity: On | ||
Space Complexity: O1 | ||
*/ | ||
getAtIndex(index) { |
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.
👍
Time Complexity: on | ||
Space Complexity: O1 | ||
*/ | ||
addLast(value) { |
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.
👍
Time Complexity: On | ||
Space Complexity: O1 | ||
*/ | ||
findMax() { |
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.
👍
Time Complexity: On | ||
Space Complexity: O1 | ||
*/ | ||
delete(value) { |
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.
👍
Time Complexity: On | ||
Space Complexity: O1 | ||
*/ | ||
visit() { |
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.
👍
while (current) { | ||
// hold the next node temporarily | ||
nextTemp = current.next; | ||
// change current to point at the previous node | ||
current.next = previous; | ||
// increment previous and current each by one | ||
previous = current; | ||
current = nextTemp; | ||
} |
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'm not sure what purpose this code serves.
No description provided.