Question d’entretien chez Cisco

Write a program to reverse a string

Réponses aux questions d'entretien

Utilisateur anonyme

11 nov. 2012

String reverse(String s){ int length = s.length()-1 String s1 = "" while (length >= 0){ s1 = s1 + s[length] length-- } return s1 }

2

Utilisateur anonyme

11 nov. 2012

forget semicolumns (;), sorry

Utilisateur anonyme

30 avr. 2013

Push char by char on a stack then concatenate all the pops until the stack is empty.