You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a function that takes in a list of unique strings and returns a list of semordnilap pairs. A semordnilap pair is defined as a set of different
strings where the reverse of one word is the same as the forward version of the other. For example, the words "diaper" and "repaid" are a semordnilap pair,
as the words "palindromes" and "semordnilap".
The order of the returned pairs and the order of the string within each pair do not matter.
Sample input:
words = ["diaper", "abc", "test", "cba", "repaid"]