首页 > > 详细

ECS 32B辅导、讲解via Canvas、辅导Python编程设计、Python讲解 讲解留学生Processing|辅导Python编

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.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!