mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
30 lines
491 B
Text
30 lines
491 B
Text
var a:={1,2,3,5};
|
|
a.sorted_insert(4);
|
|
print(a);
|
|
|
|
print("reverse");
|
|
a:={1,2,3,5};
|
|
a.reverse();
|
|
a.sorted_insert(4,0,1);
|
|
print(a);
|
|
|
|
a:={1,2,3,5};
|
|
a.reverse();
|
|
print("wrong");
|
|
a.sorted_insert(4,0,0);
|
|
print(a);
|
|
|
|
print("sub index");
|
|
a:={{1,5},{2,4},{3,3},{5,1}};
|
|
a.sorted_insert({4,2},1);
|
|
print(a);
|
|
|
|
print("sub index reverse");
|
|
a:={{1,5},{2,4},{3,3},{5,1}};
|
|
a.sorted_insert({4,2},2,1);
|
|
print(a);
|
|
|
|
print("sub index reverse wrong");
|
|
a:={{1,5},{2,4},{3,3},{5,1}};
|
|
a.sorted_insert({4,2},2);
|
|
print(a);
|