public Int32[] ReverseThroughLINQ(Int32[] _inputs,int k=0)
{
if (k==0) {
k=_inputs.Count();
}
int[] reverse = _inputs.Take(k).Reverse().ToArray();
int[] straight = _inputs.Skip(k).ToArray();
int[] _concatenatedString = reverse.Concat(straight).ToArray();
return _concatenatedString;
}
Friday, April 25, 2014
Reversing integer Array through LINQ in c#
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment