Skip to content

Instantly share code, notes, and snippets.

const input = [
['', ''],
['ABAZDC', 'BACBAD'],
['BACBAD', 'ABAZDC'],
['AGGTAB', 'GXTXAYB'],
['ABBA', 'BABAABAB'],
['GT', 'XCDFGRGDTRIFG'],
];
const output = [