Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Split each string into four arrays.
For each transaction check if it's invalid, you can do this with just a loop with help of the four arrays generated on step 1.
At the end you perform O(N ^ 2) operations.