Skip to content

Conversation

@RachaelGomez
Copy link

Linked List Comprehension Questions

Question Response
1. What advantages does a LinkedList have over an Array? Linked lists can use memory that is scattered about.
2. When is an Array more advantageous? arrays can be traversed more easily using O log n time and linked lists cannot since the memory is allocated differently
3. What questions do you have about linked lists? I'm not actually certain when I would use this.

Copy link
Contributor

@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 Rachel, you hit the learning goals here. Well done.


# Time complexity - ?
# Space complexity - ?
def add_first(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Space/Time Complexity?

Comment on lines 19 to 21
# Time complexity - ?
# Space complexity - ?
def get_first
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Space/Time Complexity?

Comment on lines 28 to 30
# Time complexity - ?
# Space complexity - ?
def length
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Space/Time Complexity?

Comment on lines 41 to 43
# Time complexity - ?
# Space complexity - ?
def add_last(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Space/Time Complexity?

Comment on lines 58 to 60
# Time complexity - ?
# Space complexity - ?
def get_last
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Space/Time Complexity?

Comment on lines 73 to 75
# Time complexity - ?
# Space complexity - ?
def get_at_index(index)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Space/Time 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