Skip to content

Earth-Maha#44

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

Earth-Maha#44
Maha-ElMais wants to merge 1 commit intoAda-C14:masterfrom
Maha-ElMais:master

Conversation

@Maha-ElMais
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 Maha, this hits all the learning goals here. Well done.

# Space complexity: ?
# call on the length method to print
# wy can't I see this test fail message when rake
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.

👍

# Time complexity: ?
# Space complexity: ?
# no each
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.

👍

# Returns true if found, false otherwise.
# Time complexity: ?
# Space complexity: ?
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.

👍

# Assumes that the array is not sorted #linear search
# Time complexity: ?
# Space complexity: ?
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 84 to 86
# Time complexity: ?
# Space complexity: ?
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.

👍

# Reverses the values in the integer array in place
# Time complexity: ?
# Space complexity: ?
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 121 to 123
# Time complexity: ?
# Space complexity: ?
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.

👍 , some indentation improvements could be done here.

Comment on lines +127 to +129
if length < 1
exit
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if length < 1
exit
end
if length < 1
exit
end

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