Skip to content

K Johnson Restricted Arrays Assignment#39

Open
Kaylaj89 wants to merge 1 commit intoAda-C14:masterfrom
Kaylaj89:master
Open

K Johnson Restricted Arrays Assignment#39
Kaylaj89 wants to merge 1 commit intoAda-C14:masterfrom
Kaylaj89:master

Conversation

@Kaylaj89
Copy link

No description provided.

Copy link
Collaborator

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

Comment on lines +9 to 11
# Time complexity: linear O(n). n represents the size/length of the array.
# Space complexity: O(1) -- constant
def length(array)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +20 to 22
# Time complexity: linear O(n). n is the size/length of array
# Space complexity: O(1) -- constant
def print_array(array)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +33 to 35
# Time complexity: linear O(n) - n represents length of the array
# Space complexity: O(1)
def search(array, length, value_to_find)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +45 to 47
# Time complexity: O(n) - n represents length of the array
# Space complexity: 0(1)
def find_largest(array, length)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +62 to 64
# Time complexity: O(n) - n represents length of array
# Space complexity: O(1)
def find_smallest(array, length)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +77 to 79
# Time complexity: O(n) -- still the length of the array
# Space complexity: O(1)
def reverse(array, length)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +95 to 97
# Time complexity: O (log n) - n is length of array
# Space complexity: O(1)
def binary_search(array, length, value_to_find)
Copy link
Collaborator

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