CSD201_-_PE_-_SP_2025_-_Block_5_3859.webp
Lucy_boy1

CSD201_-_PE_-_SP_2025_-_Block_5_3859.webp

☑Kizspy.me

void f2()-There are 2 given Box objects x, y in this function. Suppose the list contains at least 3
elements. Write statements to insert x and y to the list so that x will be the 1st (head), y will be
the 4th element in the list. Output in the file f2.txt must be the following:
(C,9,8) (D,6,3) (E,8,5) (F,5,4) (1,4,9)
(X,1,2) (C,9,8) (D,6,3) (Y,3,4) (E,8,5) (F,5,4) (1,4,9)
1
Zoom
void f3()- Suppose the list is not empty. Find the (first) node having maximum depth and change
its' place to XX. Output in the file f3.txt must be the following:
(C,8,6) (D,3,5) (E,9,2) (F,5,8) (G,9,7) (H,6,8) (1,7,3)
(C,8,6) (D,3,5) (XX,9,2) (F,5,8) (G,9,7) (H,6,8) (1,7,3)
. void f4()-Suppose the list contains at least 7 elements. Sort the 4 elements from position 2 to
position 5 (head's position is 0) ascendingly by depth. The content of the output file f4.txt must
be the following:
(C,7,9) (D,6,7) (E,5,6) (F,4,11) (1,10,5) (J,3,4) (K,2,3)
(C,7,9) (D,6,7) (J,3,4) (F,4,11) (E,5,6) (1,10,5) (K,2,3)
Quesion 2: (4 marks)
In this question you should complete some methods in BSTree.java file.
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
CSD201
Thêm bởi
Lucy_boy1
Ngày thêm
Lượt xem
746
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom