Skip to content

Water - Jessica#51

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

Water - Jessica#51
jwinchan wants to merge 1 commit intoAda-C14:masterfrom
jwinchan:master

Conversation

@jwinchan
Copy link

@jwinchan jwinchan commented Dec 2, 2020

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.

Outstanding work Jessica, thanks for getting this in. The solutions and time/space complexity are perfect.

Comment on lines +9 to 12
# Time complexity: O(n)
# Space complexity: O(1)
#[2,3,6,8,1,3]
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 +21 to 23
# Time complexity: O(n)
# Space complexity: O(1)
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: O(n)
# 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 +48 to 50
# Time complexity: O(n)
# Space complexity: O(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 +64 to 66
# Time complexity: O(n)
# 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 +79 to 81
# Time complexity: O(n)
# 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 +97 to 101
# Time complexity: O(log n)
# Space complexity: O(1)
# [1,3,6,7,9,13,17,22], 8, 22
# [1,2]
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