Compass Interview Question

Product index question, palindrome, algorithms