CSE116 / CSE504 Introduction to Computer Science II Dr. Carl Alphonce

advertisement
CSE116 / CSE504
Introduction to Computer Science II
Dr. Carl Alphonce
343 Davis Hall
alphonce@buffalo.edu
Office hours:
Thursday 12:00 PM – 2:00 PM
Friday 8:30 AM – 10:30 AM
OR request appointment via e-mail
PROFESSIONALISM
Turn off and put away electronics:
cell phones
pagers
laptops
tablets
etc.
© Dr. Carl Alphonce
Today
ROADMAP
BST Iterator
Coming up
JDT AST & visitor
Sorting
Heaps / Priority queues
© Dr. Carl Alphonce
ANNOUNCEMENTS
FINAL EXAM SCHEDULE
Arranged by the university
Check HUB for date/time/room
UNCLAIMED EXAMS
Pick up at end of class today
© Dr. Carl Alphonce
channel 1
Assumethefollowingvaluesareinsertedinto
aninitiallyemptyBST:40,38,12,42,34,43.
Inwhatorderdoesapre-ordervisitorencounterthem?
A.
B.
C.
D.
E.
F.
34,12,38,43,42,40
40,38,12,42,34,43
40,38,42,34,12,43
12,34,38,40,42,43
40,38,12,34,42,43
43,42,40,38,34,12
Assumethefollowingvaluesareinsertedinto
aninitiallyemptyBST:40,38,12,42,34,43.
Inwhatorderdoesapre-ordervisitorencounterthem?
A.
B.
C.
D.
E.
F.
34,12,38,43,42,40
40,38,12,42,34,43
40,38,42,34,12,43
12,34,38,40,42,43
40,38,12,34,42,43
43,42,40,38,34,12
Assumethefollowingvaluesareinsertedinto
aninitiallyemptyBST:40,38,12,42,34,43.
Inwhatorderdoesapre-ordervisitorencounterthem?
A.
B.
C.
D.
E.
F.
34,12,38,43,42,40
40,38,12,42,34,43
40,38,42,34,12,43
12,34,38,40,42,43
40,38,12,34,42,43
43,42,40,38,34,12
channel1
Assumethefollowingvaluesareinsertedinto
anemptybinarytree,LtoR,toptobottom:3,7,2,1,9,6,4.
Inwhatorderdoesanin-ordervisitorencounterthem?
A.
B.
C.
D.
E.
F.
1,7,9,3,6,2,4
1,2,3,4,6,7,9
9,7,6,4,3,2,1
3,7,9,3,6,2,4
3,7,2,1,9,6,4
9,1,7,2,6,3,4
Assumethefollowingvaluesareinsertedinto
anemptybinarytree,LtoR,toptobottom:3,7,2,1,9,6,4.
Inwhatorderdoesanin-ordervisitorencounterthem?
A.
B.
C.
D.
E.
F.
1,7,9,3,6,2,4
1,2,3,4,6,7,9
9,7,6,4,3,2,1
3,7,9,3,6,2,4
3,7,2,1,9,6,4
9,1,7,2,6,3,4
Assumethefollowingvaluesareinsertedinto
anemptybinarytree,LtoR,toptobottom:3,7,2,1,9,6,4.
Inwhatorderdoesanin-ordervisitorencounterthem?
A.
B.
C.
D.
E.
F.
1,7,9,3,6,2,4
1,2,3,4,6,7,9
9,7,6,4,3,2,1
3,7,9,3,6,2,4
3,7,2,1,9,6,4
9,1,7,2,6,3,4
Download