#3849

Maximum Bitwise XOR After Rearrangement

pupil · 560 · lc medium +28 · 70.9% accepted · 42 likes · top 80%

Description

Given two binary strings s and t each of length n, you may reorder the characters of t however you like while s remains fixed. Return a binary string of length n that represents the maximum integer value achievable by XOR-ing s with the rearranged t.

Code

1
2
3