Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .gradle/7.1.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified build/classes/java/main/com/oracle/arrays/Multidimensional.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

10 changes: 5 additions & 5 deletions build/reports/tests/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1>Test Summary</h1>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.042s</div>
<div class="counter">0.008s</div>
<p>duration</p>
</div>
</td>
Expand Down Expand Up @@ -85,7 +85,7 @@ <h2>Packages</h2>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0.042s</td>
<td>0.008s</td>
<td class="success">100%</td>
</tr>
</tbody>
Expand All @@ -107,12 +107,12 @@ <h2>Classes</h2>
<tbody>
<tr>
<td class="success">
<a href="classes/com.oracle.arrays.MultidimensionalTest.html">com.oracle.arrays.MultidimensionalTest</a>
<a href="classes/com.oracle.arrays.UnidimensionalTest.html">com.oracle.arrays.UnidimensionalTest</a>
</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0.042s</td>
<td>0.008s</td>
<td class="success">100%</td>
</tr>
</tbody>
Expand All @@ -126,7 +126,7 @@ <h2>Classes</h2>
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.1.1</a> at Sep 6, 2022, 10:57:32 PM</p>
<a href="http://www.gradle.org">Gradle 7.1.1</a> at 12 sep. 2022 13:35:34</p>
</div>
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions build/reports/tests/test/packages/com.oracle.arrays.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1>Package com.oracle.arrays</h1>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.042s</div>
<div class="counter">0.008s</div>
<p>duration</p>
</div>
</td>
Expand Down Expand Up @@ -78,12 +78,12 @@ <h2>Classes</h2>
</thread>
<tr>
<td class="success">
<a href="../classes/com.oracle.arrays.MultidimensionalTest.html">MultidimensionalTest</a>
<a href="../classes/com.oracle.arrays.UnidimensionalTest.html">UnidimensionalTest</a>
</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0.042s</td>
<td>0.008s</td>
<td class="success">100%</td>
</tr>
</table>
Expand All @@ -96,7 +96,7 @@ <h2>Classes</h2>
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.1.1</a> at Sep 6, 2022, 10:57:32 PM</p>
<a href="http://www.gradle.org">Gradle 7.1.1</a> at 12 sep. 2022 13:35:34</p>
</div>
</div>
</body>
Expand Down

This file was deleted.

Binary file modified build/test-results/test/binary/results.bin
Binary file not shown.
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Binary file modified build/tmp/compileTestJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@
public class MultidimensionalImpl implements Multidimensional {
@Override
public Posicion getPosition(String[][] datos, String dato) {
for (int i=0; i< datos.length;i++){
for (int j=0; j<datos[i].length; j++){
if (datos[i][j].equals(dato)){
return new Posicion(i,j);
}
}
}
return null;
}

@Override
public String getData(String[][] datos, Posicion posicion) {
return null;
return datos[posicion.getX()][posicion.getY()];
}
}
19 changes: 18 additions & 1 deletion src/main/java/com/oracle/arrays/impl/UnidimensionalImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,27 @@
public class UnidimensionalImpl implements Unidimensional {
@Override
public void ordenamiento(int[] arr) {
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()

aux = arr[j];
arr[j] = arr[j+1];
arr[j+1] = aux;
}
}
}
}

@Override
public int[] ordenamientoReversa(int[] arr) {
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.

aux = arrInvertido[i];
arrInvertido[i] = arrInvertido[arrInvertido.length - 1 - i];
arrInvertido[arrInvertido.length - 1 - i] = aux;
}
return arrInvertido;
}
}