first commit with existing project files
This commit is contained in:
17
algo_js/tableau_tri.js
Normal file
17
algo_js/tableau_tri.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// Tri tableau
|
||||
|
||||
let table = [17, 22, 43, 61, 45, 49, 8, 27, 62];
|
||||
|
||||
for (let i = 0; i < table.length; i++) {
|
||||
|
||||
for (let j = i+1; j < table.length; j++) {
|
||||
|
||||
if (table[i] > table[j]) {
|
||||
let temp = table[i];
|
||||
table[i] = table[j];
|
||||
table[j] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(table)
|
||||
|
||||
Reference in New Issue
Block a user