First sort by value, then sort by lexicography.
The point of this problem is to find the most appearance of s[i] - d[i].
Check one by one.
The most important is to consider all the situations that doesn't make a peak.
This is bit XOR Operation.
If we combine the left search with the right search, we need to make the lines with shorter height move.
We can simulate the order of the place order. Store them in a matrix and then combine the answer string.
Given a string s, find the length of the longest substring without repeating characters.
There are three rules to sort the structs.
This just struct sort. The most easy one with no tricks.
Using the math way of transforming the decimal to any number.
So our goal is to find whether there is a difference between two words that is not even.