Home > Back-end >  With 26 lowercase and 10 Numbers 4, how to print the combination of each group (bosses first aid int
With 26 lowercase and 10 Numbers 4, how to print the combination of each group (bosses first aid int

Time:12-05

With 26 lowercase and 10 Numbers 4, how to print the combination of each group (bosses first aid interview questions)

CodePudding user response:

4 a for loop

CodePudding user response:

Using a recursive is simpler, give you a small example
 static String [] CHAR=new String [] {" a ", "b", "c", "d", "e", "f", "g", "h", "I", "j"}; 
Public static void print (String STR) {
If (STR) length ()==4) {
System. The out. Println (STR);
return;
}
For (String s: CHAR) {
Print (STR + s);
}
}
Public static void main (String [] args) {
Print (" ");
}

CodePudding user response:

This thing will write, mainly put each group of four, printed in each group

CodePudding user response:

reference white pupil los reply: 3/f
it will write, mainly put each group of four, print out each group


To build a List Into it, to meet the requirements of group, after completion of traversal, print the list to go,

CodePudding user response:

https://blog.csdn.net/weixin_44777183/article/details/88659011? Utm_medium=distribute. Pc_relevant_bbs_down. None - task - blog - baidujs - 1. Nonecase& Depth_1 - utm_source=distribute. Pc_relevant_bbs_down. None - task - blog - baidujs - 1. Nonecase
Ask interview questions directly read blogs, post have to wait to what time
  • Related