Pergunta de entrevista da empresa 99x

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

Respostas da entrevista

Sigiloso

2 de jun. de 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

Sigiloso

21 de out. de 2019

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