Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
sort($arr);Абстракционизм
...
{
$a = $arr[$j];
$a1 = $arr[$j+1];
if ($a<=$a1)
continue;
$arr[$j] = $a1;
$arr[$j+1] = $a;
}
arr = arr
.OrderBy(x=>x)
.ToArray();
// todo: write a code
$config = array(
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=site',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
'clientScript' => array(
'scriptMap' => array(
),
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'log' => array(
'class' => 'CLogRouter',
'routes' => array(
array(
'class' => 'CFileLogRoute',
'levels' => 'error, warning',
),
),
),
);
$config = array(
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=site',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
'clientScript' => array(
'scriptMap' => array(
),
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'log' => array(
'class' => 'CLogRouter',
'routes' => array(
array(
'class' => 'CFileLogRoute',
'levels' => 'error, warning',
),
),
),
);
$config = array(
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=site',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
'clientScript' => array(
'scriptMap' => array(
),
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'log' => array(
'class' => 'CLogRouter',
'routes' => array(
array(
'class' => 'CFileLogRoute',
'levels' => 'error, warning',
),
),
),
);
...
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=site',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
...
$A_R__R[$j]; + $A_R__R[$j+1]$data = $_POST[ 'modern' ];
for( $i = sizeof($data)-1; $i >= 0; $i-- ){
for( $j = 0; $j <= ($i-1); $j++ ) {
if( $data[$j] > $data[$j+1] ) {
$data[$j] ^= $data[$j+1] ^= $data[$j] ^= $data[$j+1];
}
}
}
int size, i, j;
var temp;
let size = sizeof(arr)-1;
for i in range(size, 0) {
for j in range(0, i - 1) {
if arr[j] > arr[j+1] {
let temp = arr[j];
let arr[j] = arr[j+1];
let arr[j+1] = (int)k;
}
}
}

Учимся разбираться в искусстве программирования