Skip to content

week1-assignment1#2

Open
Huda-Abid wants to merge 6 commits intomainfrom
feature/huda
Open

week1-assignment1#2
Huda-Abid wants to merge 6 commits intomainfrom
feature/huda

Conversation

@Huda-Abid
Copy link
Collaborator

No description provided.

@Huda-Abid Huda-Abid requested a review from AbdullahKhan31 May 25, 2022 13:30
maxAux(max = if (max > xsTail.head) max else xsTail.head, xsTail.tail)
}
}
maxAux(-1000, xs)
Copy link
Collaborator

@AbdullahKhan31 AbdullahKhan31 May 26, 2022

Choose a reason for hiding this comment

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

this will fail in case where all the elements in the actual array are less then -1000, use the first element of the array as max in the first iteration.
maxAux(xs.head, xs.tail)

@Huda-Abid Huda-Abid requested a review from dmalik1993 May 28, 2022 18:31
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.

3 participants