Skip to content

Maha C14 - Linked List #30

Open
Maha-ElMais wants to merge 4 commits into
Ada-C14:masterfrom
Maha-ElMais:master
Open

Maha C14 - Linked List #30
Maha-ElMais wants to merge 4 commits into
Ada-C14:masterfrom
Maha-ElMais:master

Conversation

@Maha-ElMais

Copy link
Copy Markdown

No description provided.

@CheezItMan CheezItMan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Well done Maha, you hit the learning goals here. Nice work!

Comment thread lib/linked_list.rb
@@ -21,92 +21,195 @@ def initialize
# Time Complexity: ?
# Space Complexity: ?
def add_first(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 thread lib/linked_list.rb
Comment on lines +30 to 32
# Time Complexity: O(n)
# Space Complexity: O(1)
def search(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 thread lib/linked_list.rb
Comment on lines +47 to 49
# Time Complexity: O(n)
# Space Complexity: O(1)
def find_max

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 thread lib/linked_list.rb
Comment on lines +67 to 69
# Time Complexity: O(n)
# Space Complexity: O(1)
def find_min

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 thread lib/linked_list.rb
Comment on lines +89 to 91
# Time Complexity: O(1)
# Space Complexity: O(1)
def get_first

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 thread lib/linked_list.rb
Comment on lines +131 to 133
# Time Complexity: O(n)
# Space Complexity: O(1)
def get_at_index(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 thread lib/linked_list.rb
Comment on lines +149 to 151
# Time Complexity: O(n)
# Space Complexity: O(1)
def visit

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 thread lib/linked_list.rb
Comment on lines +162 to 164
# Time Complexity: O(n)
# Space Complexity: O(1)
def delete(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 thread lib/linked_list.rb
Comment on lines +182 to 184
# Time Complexity: O(n)
# Space Complexity: O(1)
def reverse

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 thread lib/linked_list.rb
Comment on lines +202 to 204
# Time Complexity: O(n)
# Space Complexity: O(1)
def get_last

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