联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2021-05-10 10:26


ECS 32B: Winter 2019

Homework Assignment 6

Due Date: No later than Friday, March 15, 9:00pm. Submit your solutions via Canvas in one

file named “hw6.py”.

1. (40 points) Programming Exercise 8 from Chapter 6 of your textbook. Think “heapsort”. Use

the code given in the textbook as your foundation. Reminder: do not use outside sources, including

the Internet, in deriving your solution to this problem or the next.

2. (40 points) Given the following graphs:

2a. Write the names of the vertices (cities) in the order you would visit them if you performed

a breadth-first traversal of Graph A, starting with the vertex named Frankfurt.

2b. Write the names of the vertices (cities) in the order you would visit them if you performed

a breadth-first traversal of Graph B, starting with the vertex named Frankfurt.

2c. Write the names of the vertices (cities) in the order you would visit them if you performed

a depth-first traversal of Graph A, starting with the vertex named Frankfurt.

2d. Write the names of the vertices (cities) in the order you would visit them if you performed

a depth-first traversal of Graph B, starting with the vertex named Frankfurt.

Note that Graph A is undirected and Graph B is directed. You may ignore any weights on edges.

Submit your solutions to Problem 2 as comments in the “hw6.py” file that also contains your

solution to Problem 1.



版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp