文件名称:ThreeColorsFlags
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 白*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
ThreeColorFlags问题最早由E.W.Dijkstra所提出,塔所使用的用语为Dutch Nation Flag(Dijkstra为荷兰人),而多数的作者则使用Three-Color Flag来说明。
假设有一条绳子,上面有红,白,蓝三种颜色的旗子,起初绳子上的旗子颜色并没有顺序,您希望将之分类,并排列蓝,白,红的顺序,要如何移动次数才会最少,注意您只能在绳子上进行这个动作,而且一次只能调换两个旗子。
-ThreeColorFlags problem was first raised by EWDijkstra, Tap the term used for the Dutch Nation Flag (Dijkstra for the Dutch), whereas most authors use the Three-Color Flag to illustrate. Assuming that there is a rope, there are red, white and blue three colors of the flag, the initial color of the rope on the flag did not order, you would like to be classified, and with blue, white, red sequence, it is necessary to how the mobile number will be at least, note that you can only be carried out on the rope moves, and can only swap two flags.
假设有一条绳子,上面有红,白,蓝三种颜色的旗子,起初绳子上的旗子颜色并没有顺序,您希望将之分类,并排列蓝,白,红的顺序,要如何移动次数才会最少,注意您只能在绳子上进行这个动作,而且一次只能调换两个旗子。
-ThreeColorFlags problem was first raised by EWDijkstra, Tap the term used for the Dutch Nation Flag (Dijkstra for the Dutch), whereas most authors use the Three-Color Flag to illustrate. Assuming that there is a rope, there are red, white and blue three colors of the flag, the initial color of the rope on the flag did not order, you would like to be classified, and with blue, white, red sequence, it is necessary to how the mobile number will be at least, note that you can only be carried out on the rope moves, and can only swap two flags.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ThreeColorsFlags.java