Skip to content

Conversation

@Pazuzu66
Copy link

@Pazuzu66 Pazuzu66 commented Sep 9, 2022

No description provided.

@Override
public void ordenamiento(int[] arr) {
Posicion pos = new Posicion(0, 0);
for (int i = 0; i < arr.length - 1; i++) {
Copy link
Owner

Choose a reason for hiding this comment

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

La logica de ordenamiento es correcta, pero para mejorar el performance considera utilizar Arrays.sort()

return null;
Posicion pos = new Posicion(0, 0);
for (int i = 0; i < arr.length - 1; i++) {
if (arr[i] < arr[i + 1]) {
Copy link
Owner

Choose a reason for hiding this comment

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

Lo mismo aqui, la logica de ordenamiento es correcta, pero para mejorar el performance considera utilizar Arrays.sort(), pero usando comparator

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