99x interview question

How can you reverse the elements of the given string array?

Interview Answers

Anonymous

2 Jun 2018

if(strArr.length == 0){ System.out.println("The array is empty"); } else { for(int i = strArr.length-1; i>=0; i--){ System.out.print(strArr[i] +", "); } } I believe this is the answer to the question. If I am wrong please corrent me

Anonymous

21 Oct 2019

we can do return (arr[::-1]) in Python. Is it okay to answer this using Python?