Skip to content

Conversation

@jesusgil01
Copy link

No description provided.

@jesusgil01 jesusgil01 closed this Sep 12, 2022
@jesusgil01 jesusgil01 reopened this Sep 12, 2022
int aux;
for (int i=0; i< arr.length-1; i++){
for (int j=0; j<arr.length-1; j++){
if (arr[j]>arr[j+1]){
Copy link
Owner

Choose a reason for hiding this comment

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

Puedes ver si hay una mejora de ordenamiento con respecto a tu actual solucion, hay algoritmos mas rapidos que puedes implementar incluso Arrays.sort()

return null;
int arrInvertido[] = arr;
int aux;
for (int i=0; i<arrInvertido.length/2; i++){
Copy link
Owner

Choose a reason for hiding this comment

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

Este codigo tambien puede tener una mejora.

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