Ad
  • Default User Avatar

    it's just a way to check the common elements between two sets: old groups the player plaied in and the new group. The only common element must be the player itself

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar
  • Default User Avatar

    can you please tell me how it will take only bcacb.as according to my code it will take character from end so "abcacba" it will take "a" from end and index wil be start from 0 and it is found at ""0"" index because index is search from 0th index. therefore substring will become "abcacba"....

  • Custom User Avatar

    You might want to add Test.assertEquals(longestPalindrome("abcacba"), 7) as a test case. I've seen a solution which effectively iterates the array, for each character looks up the next index of of that character and decides if it's a palindrome -- this case will fail that method because it will only consider bcacb as a palindrome, since a -> a would only get the first half of the palindrome in the string.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution