You are given two fronts and backs, each of length n, representing the numbers written on the front and back of n cards.
You can flip any number of cards. Flipping a card swaps the number on its front with the number on its back.
A number is considered good if it is on the back of at least one card and does not appear on the front of any card.
Return the minimum possible good number. If no good number can be obtained, return
Constraints:
n == fronts.length == backs.length
n
fronts[i], backs[i]
You are given two fronts and backs, each of length n, representing the numbers written on the front and back of n cards.
You can flip any number of cards. Flipping a card swaps the number on its front with the number on its back.
A number is considered good if it is on the back of at least one card and does not appear on the front of any card.
Return the minimum possible good number. If no good number can be obtained, return
Constraints:
n == fronts.length == backs.length
n
fronts[i], backs[i]