Sihai network

How many times does the patient have to move

There are five single rooms in the private ward area of ridden general hospital. The far right emergency room is now empty. Four patients, a, B, C and D, lived in the other wards. Now their ward is marked with the first letter of their name (as shown below).

The patients seemed to be satisfied, but the head nurse was thinking about changing positions D and a, C and B. It seems that the head nurse is a very organized person, because in this way, the positions of all patients will be arranged alphabetically and easy to manage. Since all patients have paid for living in private ward, it is not allowed to arrange two patients in the same ward at the same time, nor leave another patient unattended in the windy corridor when one patient moves. In order to carry out the order of the head nurse, how many times must the sad little nurse move the house for the patient?

Test results:

Must move 10 times: A to the emergency room, C to 4, D to 2, B to 1, a to 3, C to the emergency room, D to 4, B to 2, a to 1, C to 3.