Question d’entretien chez Arista Networks

implement a function that determines a string is whether a palindrome or not

Réponses aux questions d'entretien

Utilisateur anonyme

24 oct. 2017

I wrote a recursive function that gets a string, starting point and ending point.

Utilisateur anonyme

12 déc. 2017

#include #include main() { char str[]="abcbba"; int len=0; len=strlen(str); for(int i=0;i<=len/2;i++) { if(str[i] != str[(len-i)-1]) { printf("The string is not a palindrome\n"); return; } } printf("The string is a palindrome\n"); }

Utilisateur anonyme

12 déc. 2017

#include #include main() { char str[]="abcbba"; int len=0; len=strlen(str); for(int i=0;i<=len/2;i++) { if(str[i] != str[(len-i)-1]) { printf("The string is not a palindrome\n"); return; } } printf("The string is a palindrome\n"); }