Tap here to switch tabs
Problem
Submissions

Problem: Maximum Bitwise XOR After Rearrangement

Try to solve the Maximum Bitwise XOR After Rearrangement problem.

Statement

You are given two binary strings s and t of equal length.

You can rearrange the characters of t in any order.

Return a binary string representing the maximum possible bitwise XOR result between s and any rearrangement of t.

Constraints:

  • 1≤n==1 \leq n == s.length ==== t.length ≤2×105\leq 2 \times 10^5

  • s[i] and t[i] are either '0' or '1'.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Bitwise XOR After Rearrangement

Try to solve the Maximum Bitwise XOR After Rearrangement problem.

Statement

You are given two binary strings s and t of equal length.

You can rearrange the characters of t in any order.

Return a binary string representing the maximum possible bitwise XOR result between s and any rearrangement of t.

Constraints:

  • 1≤n==1 \leq n == s.length ==== t.length ≤2×105\leq 2 \times 10^5

  • s[i] and t[i] are either '0' or '1'.