You are given an array of two character strings cards and a character x.
In one turn, you can select and remove two compatible cards from cards. Two cards are considered compatible if:
Both cards contain the character x at the same index, either both at index
The characters at the other index are different.
Return the maximum number of turns you can make.
Constraints:
cards.length
cards[i].length
Each cards[i] is composed of only lowercase English letters between 'a' and 'j'
x is a lowercase English letter between 'a' and 'j'
You are given an array of two character strings cards and a character x.
In one turn, you can select and remove two compatible cards from cards. Two cards are considered compatible if:
Both cards contain the character x at the same index, either both at index
The characters at the other index are different.
Return the maximum number of turns you can make.
Constraints:
cards.length
cards[i].length
Each cards[i] is composed of only lowercase English letters between 'a' and 'j'
x is a lowercase English letter between 'a' and 'j'