[ /tv/ /rf/ /vg/ /a/ /b/ /u/ /bo/ /fur/ /to/ /dt/ /cp/ /oe/ /bg/ /ve/ /r/ /mad/ /d/ /mu/ /cr/ /di/ /sw/ /hr/ /wh/ /lor/ /s/ /hau/ /slow/ /gf/ /vn/ /w/ /ma/ /azu/ /wn/ ] [ Main | Settings | Bookmarks | Music Player ]

No.45715 Reply
File: 1288183581156.jpg
Jpg, 31.87 KB, 450×410 - Click the image to expand
edit Find source with google Find source with iqdb
1288183581156.jpg
Анон, подскажи, как будет лучше всего отсортировать массив целых чисел . На твоём любимом языке.
>> No.45718 Reply
File: serious_cat_by_foxpackz-d7v7bme.jpg
Jpg, 110.42 KB, 1500×1200 - Click the image to expand
edit Find source with google Find source with iqdb
serious_cat_by_foxpackz-d7v7bme.jpg
<?php

$a = [1,5,2];
sort($a);
var_dump($a);
>> No.45719 Reply
Ещё более серьёзный метод:
SELECT *
FROM some
ORDER BY some.some
>> No.45720 Reply
>>45715
package main

import (
"sort"
"fmt"
)

func main() {
arr := []int{1, 3, 2}
sort.Ints(arr)
fmt.Println(arr) // [1 2 3]
}
>> No.45890 Reply
File: DSCN5715.JPG
Jpg, 214.62 KB, 816×612 - Click the image to expand
edit Find source with google Find source with iqdb
DSCN5715.JPG
>>45715
Какой размерности массив?
>> No.45893 Reply
var arr = [5, 12, 34, 0, 1];

arr.sort(function (a, b) {
return a - b;
});

console.log(arr);
>> No.45894 Reply


Password:

[ /tv/ /rf/ /vg/ /a/ /b/ /u/ /bo/ /fur/ /to/ /dt/ /cp/ /oe/ /bg/ /ve/ /r/ /mad/ /d/ /mu/ /cr/ /di/ /sw/ /hr/ /wh/ /lor/ /s/ /hau/ /slow/ /gf/ /vn/ /w/ /ma/ /azu/ /wn/ ] [ Main | Settings | Bookmarks | Music Player ]