Exercises
We will resolve a few array exercises from Hackerrank using the concepts we learned in this chapter.
Reversing an array
The first exercise we will resolve the is reverse array problem available at
function reverseArray(a: number[]): number[] {
return a.reverse();
}
This is a solution that passes all the tests and resolves the problem. However, if this exercise is being used in technical interviews, the interviews...