0

How to solve a palindrome array

help

23rd Nov 2016, 9:53 AM
Derek Spurgeon
Derek Spurgeon - avatar
2 Answers
0
public static boolean isPalindrome(int[] palindrom){                  int s = 0;         int e = palindrom.length-1;         boolean weiter = true;         while (weiter && s < e) {             weiter = ((palindrom[s++] == palindrom[e--])?true:false);         }         return weiter;     }
29th Dec 2016, 6:43 PM
Murmeltier
Murmeltier - avatar
0
@Murmeltier can u explain it more detailed instructions please
16th Jan 2017, 1:44 AM
Scorpion Fox
Scorpion Fox - avatar