| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 584 人关注过本帖
标题:排列组合
取消只看楼主 加入收藏
xiexiaoqiang
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2006-2-26
收藏
 问题点数:0 回复次数:0 
排列组合

楼主帮帮我,我头都想大了,还是写不出来。恕我是初学者,还请体谅///

Problem: Use your most hands-on programming language to implement a function that prints all possible combinations of the characters in a string. These combinations range in length from one to the length of the string. Two combinations that differ only in ordering of the characters ARE the same combination. In other words, “12” and “31” are different combinations from the input string “123”, but “21 is the same as “12”.

For example, if we use “wxyz” as parameter for Combination(“wxyz”) the function will print out


w

x

y

z

wx

wy

wz

xy

xz

yz

wxy

wxz

wyz

xyz

wxyz

搜索更多相关主题的帖子: 排列 
2006-05-23 20:22
快速回复:排列组合
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012109 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved