CSD201_-_PE_-_01_-_SU_2022_-_Trial_2847.webp
ThaiNgoc2003

CSD201_-_PE_-_01_-_SU_2022_-_Trial_2847.webp

(C,8) (D,6) (E,9) (F,2) (G,7) (H,1) (1,3) (1,5) (K,4)
void f4() - Perform breadth-first traversal from the root and find the first node p having left son and price < 7. Rotate p to right about its' left son. Output in the file f4.txt must be the following:(C,8) (D,6) (E,9) (F,2) (G,7) (H,1) (1,3) (1,5) (Κ,4)
(C,8) (F,2) (E,9) (H,1) (D,6) (1,3) (G,7) (J,5) (K,4)
2
Question 3:(2 marks) In this question you should complete some methods in Graph.java file.
The class Graph is the implementation of a graph. The following methods should be completed:
void f1() - Perfom depth-first traversal (to the file f1.xt) from the vertex i=1 (the vertex B) but display first 5 vertices only. Hint: copy depth(...) to depth2(...) and modify the latter one. Content of the output file f1.txt must be:
BGAEFICHD
BGAEF
Zoom

+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
CSD201_-_PE_-_01_-_SU_2022_-_Trial_2847.webp
File size
161.4 KB
Dimensions
1145px x 753px

Share this media

Back
Bên trên Bottom