1445 - DS_18_CHEN_HW4 Scoreboard

Time

2018/04/27 02:10:00 2018/05/13 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11902 Matrix to Tree Converter (CS2351)

11902 - Matrix to Tree Converter (CS2351)   

Description

  • Given
    • A matrix of digits
    • A starting non-zero digit
    • A traversal method
  • Task
    • Convert the nonzero digits of the path in matrix into a tree
    • Print out the digits according to one of the following tree traversal methods
      • Level-order-traversal
      • Pre-order-traversal
      • Post-order-traversal
  • Example

Input

width < 100 and height <100 

Traversal method can be one of the following:

  • "Level-order-traversal"
  • "Pre-order-traversal"
  • "Post-order-traversal"

Output

print out the tree traversal

There is an white space between each elements.

Sample Input  Download

Sample Output  Download

Tags




Discuss