Nu aveti permisiuni pentru a descarca fisierul grader_test2.in
Diferente pentru problema/tdeque intre reviziile #3 si #4
Nu exista diferente intre titluri.
Diferente intre continut:
De exemplu, dacă avem permutarea $1 3 2 5 4$, o modalitate de a sorta această permutare este aplicarea următoarelor operaţii:
* 0. Iniţial, structura este goală-().* 1. pushNext, structura devine (1).* 2. pushNext, structura devine (1, 3).* 3. frontToBack, structura devine (3, 1).* 4. pushNext, structura devine (3, 1, 2).* 5. backToFront, structura devine (1, 2, 3).* 6. pushNext, structura devine (1, 2, 3, 5).* 7. fronToBack, structura devine (5, 1, 2, 3).* 8. pushNext, structura devine (5, 1, 2, 3, 4).* 9. backToFront, structura devine (1, 2, 3, 4, 5).
* 0. Iniţial, structura este goală: () * 1. pushNext, structura devine: (1) * 2. pushNext, structura devine: (1, 3) * 3. frontToBack, structura devine: (3, 1) * 4. pushNext, structura devine: (3, 1, 2) * 5. backToFront, structura devine: (1, 2, 3) * 6. pushNext, structura devine: (1, 2, 3, 5) * 7. fronToBack, structura devine: (5, 1, 2, 3) * 8. pushNext, structura devine: (5, 1, 2, 3, 4) * 9. backToFront, structura devine: (1, 2, 3, 4, 5)
h2. Date de intrare