Pergunta de entrevista da empresa Intel Corporation

Write a recursive Java function to reverse a String object

Resposta da entrevista

Sigiloso

18 de jul. de 2015

public String reverse(){ if ( (str==null) || str.length()<=1) ){ return str; } return reverse(str.substring(1))+str.chatAt(0); }

6