algos
public static T[] slice<T>(T[] l, int from, int to)
{
T[] r = new T[to - from];
for (int i = from; i < to; i++)
{
r[i-from]=l[i];
}
return r;
}
src: https://stackoverflow.com/a/32965043/2910338
public static T[] slice<T>(T[] l, int from, int to)
{
T[] r = new T[to - from];
for (int i = from; i < to; i++)
{
r[i-from]=l[i];
}
return r;
}
src: https://stackoverflow.com/a/32965043/2910338
Комментарии
Отправить комментарий