14-recursive-backtracking.ppt.pptVIP

  • 18
  • 0
  • 约9.79千字
  • 约 20页
  • 2017-03-09 发布于天津
  • 举报
14-recursive-backtracking.ppt

* Exercise: Dice rolls Write a method diceRoll that accepts an integer parameter representing a number of 6-sided dice to roll, and output all possible combinations of values that could appear on the dice. diceRoll 2 ; diceRoll 3 ; [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [1, 6] [2, 1] [2, 2] [2, 3] [2, 4] [2, 5] [2, 6] [3, 1] [3, 2] [3, 3] [3, 4] [3, 5] [3, 6] [4, 1] [4, 2] [4, 3] [4, 4] [4, 5] [4, 6] [5, 1] [5, 2] [5, 3] [5, 4] [5, 5] [5, 6] [6, 1] [6, 2] [6, 3] [6, 4] [6, 5] [6, 6] [1, 1, 1] [1, 1, 2] [1, 1, 3] [1, 1, 4] [1, 1, 5] [1, 1, 6] [1, 2, 1] [1, 2, 2] ... [6, 6, 4] [6, 6, 5] [6, 6,

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档