Theme: Tree Data Structure


Download 17.6 Kb.
Sana28.12.2022
Hajmi17.6 Kb.
#1015212

LABORATORY WORK -2.

THEME: Tree Data Structure




Traverse Them in following orders:
(a) Inorder
(b) Preorder
(c) Postorder
VARIANTS:



  1. 5, 3 ,2, 10, 14, 13 ,56, 12, 33, 23, 1,32,35,70,59

  2. 7,4,2,5, 14,12,13,11,18,15,17,16,3,1,20,19,24

  3. 19, 14,12,15,13,10,21,19,24,28,25,26,23,33,30,35,34

  4. 35,44,21,25,23,20, 42,43, 41, 15, 17,47,45,46,49,48

  5. 43, 30,25,27,29, 26, 49,46, 48,47, 55,53,54,59,58,60

  6. 30,25,26,23,24,39,35, 33,34,41,40,42,33,31,32,46,44,45,

  7. 42, 30,35,33,36,34,29,27,28,26,47,45,46,43

  8. 36,23,25,24,20,21,24,15,13,40,37,38,39,42

  9. 31, 24,12,23,21, 27,26,28,25,34,32,35,33

  10. 18, 6,3,7,4,2,9,17,20,19,25,28,30

  11. 19, 11,9, 5,8,10,15,14,17,16,18,25,22,27,26

  12. 8, 4,2,6,3,5, 11,9,14,13,12,10,1,17,15,16

  13. 17, 34,23,26,24,27,23,20,7,4,9,8,3,1,2

  14. 33,24,27,20, 28,14,16,11,13,10,38,35,34,36

  15. 22,17,14,19,18,13,10,9,12,26,24,23,25

  16. 43, 33, 24,36,35,37,26,22,23,19,18,47,45,44,46,49,48,50

  17. 25, 20,17,19,16,22,21,24,23,34,30,31,29, 38,35,36, 40,39,44,

  18. 40,14,10,13,12,8,9,7,17,15,16,14,44,42,41,43,47

  19. 18, 9,4,6,3,5,7,23,20,19,22,21,28,25,26,24

  20. 17,8,3,4,2,1,5,20,18,19,25,23,27,26,22, 30,35,33,34,37

  21. 36,30,33,29,31,28,23,25,21,24,39,37,38,40

  22. 18,14,16,15,17,10,13,11,8,9,7,24,22,26,25,27,

  23. 36,45,40,42,41,38,37,39,19,24,16,17,15,29,25

  24. 19,14,16,12,13,10,11,30, 40,35,36,33,34,31

  25. 15,31,6,3,4,2,20,1, 15,24,22,23,21,35,32

  26. 14, 24,10, 8,9,4,5,3,1,2,29,24, 26, 25,23,33,30,35,34

Download 17.6 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling