Logic-Test of pallindrome and sum diagonal array