Skip to content

Conversation

@lebaongoc
Copy link

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.

Thanks for getting this in Ngoc It looks good, nice work!

# find the nth node from the end and return its value
# assume indexing starts at 0 while counting to n
# Time Complexity:
# Space Complexity

Choose a reason for hiding this comment

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

Time and space complexity?

# returns the value in the first node
# returns nil if the list is empty
# Time Complexity:
# Space Complexity

Choose a reason for hiding this comment

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

Should be O(1) for both

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