Quora·Software Engineer·Technical Phone Screen
- Given a string of lowercase letters, count how many distinct palindromic subsequences of lengths 2, 3, and 4 exist. Count by unique string value, not by number of index combinations.
“The 'distinct by value not by index' part is what tripped me up initially.”