Skip to content

LIN(ked Lists) - Rock#54

Open
lzhang39 wants to merge 2 commits intoAda-C15:masterfrom
lzhang39:master
Open

LIN(ked Lists) - Rock#54
lzhang39 wants to merge 2 commits intoAda-C15:masterfrom
lzhang39:master

Conversation

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

Comment on lines +18 to 20
# Time Complexity: O(1)
# Space Complexity: O(1)
def get_first(self):
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 on lines +27 to 30
# Time Complexity: O(1)
# Space Complexity: O(1)

def add_first(self, value):
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 on lines +35 to 37
# Time Complexity: O(n)
# Space Complexity: O(1)
def search(self, value):
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 on lines +46 to 48
# Time Complexity: O(n)
# Space Complexity: O(1)
def length(self):
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 on lines +59 to 61
# Time Complexity: O(n)
# Space Complexity: O(1)
def get_at_index(self, index):
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 on lines +73 to 76
# Time Complexity: O(1)
# Space Complexity: O(1)

def get_last(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 The time complexity is O(n)

Comment on lines +98 to 100
# Time Complexity: O(n)
# Space Complexity: O(1)
def find_max(self):
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 on lines +112 to 114
# Time Complexity: O(n)
# Space Complexity: O(1)
def delete(self, value):
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 on lines +128 to 130
# Time Complexity: O(n)
# Space Complexity: O(n)
def visit(self):
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 on lines +142 to 144
# Time Complexity: O(n)
# Space Complexity: O(1)
def reverse(self):
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