From one sequence of digits, another sequence of digits has to be formed as per the following rule:
Double switch: interchange of any two digits that have at most one digit between them (that is, two digits that are either next to each other or have exactly one digit sitting between them), where one such interchange counts as one step.
Using only double switching, what is the minimum number of steps required to change 165324 to 123456?