Skip to content

Conversation

@abozaid-ibrahim
Copy link
Contributor

@abozaid-ibrahim abozaid-ibrahim commented Aug 15, 2019

Checklist

Description

Copy link
Contributor

@richard-ash richard-ash left a comment

Choose a reason for hiding this comment

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

Cool thanks for the update 😄

Couple small stylistic comments otherwise looks good!

while y > 0 && a[y] < a[y - 1] { // 3
a.swapAt(y - 1, y)
y -= 1
var sortedArray = array // 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the // 1, // 2, etc vertical with each other?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could you clarify what you mean by making them vertical

var currentIndex = index
let temp = sortedArray[currentIndex]
while currentIndex > 0 && temp < sortedArray[currentIndex - 1] {
sortedArray[currentIndex] = sortedArray[currentIndex - 1] // 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@richard-ash
Copy link
Contributor

Thanks for the updates! The last two comments still need updating then I'll merge 🙂

@abozaid-ibrahim
Copy link
Contributor Author

abozaid-ibrahim commented Sep 8, 2019 via email

@abozaid-ibrahim
Copy link
Contributor Author

Hi, I don't understand why the Pr still open till now :(

@richard-ash richard-ash merged commit e93f3c6 into kodecocodes:master Aug 29, 2020
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