Skip to content

Conversation

@yieknee
Copy link

@yieknee yieknee commented Aug 25, 2020

Hi Chris,

Sorry couldn't finish the last two. I don't feel good and I hit my wall.

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.

You did well on the methods you did finish. Take a look at my few comments and let me know what questions you have.

Comment on lines +21 to 23
# Time Complexity: O(1)?
# Space Complexity: O(1)?
def add_first(value)

Choose a reason for hiding this comment

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

👍 , very compact!

Comment on lines +31 to 33
# Time Complexity: o(n)?
# Space Complexity: O(1)?
def search(value)

Choose a reason for hiding this comment

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

👍

Comment on lines 44 to 46
# method to return the max value in the linked list
# returns the data value and not the node
def find_max

Choose a reason for hiding this comment

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

👍

Comment on lines +60 to 62
# Time Complexity: O(n)?
# Space Complexity: O(1)?
def find_min

Choose a reason for hiding this comment

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

👍

Comment on lines 75 to 77
# Time Complexity: ?
# Space Complexity: ?
def length

Choose a reason for hiding this comment

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

👍 , time/space complexity ❓

Comment on lines +96 to +98
index.times do
current = current.next
end

Choose a reason for hiding this comment

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

What if index >= length?

Comment on lines 90 to 92
# Time Complexity: ?
# Space Complexity: ?
def get_at_index(index)

Choose a reason for hiding this comment

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

👍 With one caveat below

Comment on lines 103 to 105
# Time Complexity: ?
# Space Complexity: ?
def visit

Choose a reason for hiding this comment

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

👍 Time/space complexity ❓

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