Welcome![Sign In][Sign Up]
Location:
Downloads WEB Code JSP/Java
Title: zhaopai Download
 Description: Java: find shunzi in n CARDS So here's the problem: there are n CARDS, and the value of each card is: 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A. Find the shunzi (5 CARDS and 5 consecutive CARDS) in these n CARDS and print them out. Thought: my idea is very simple, first is to remove the duplicate card, because the same as the same as the number one, it is obvious that the Set in JAVA is suitable for this job. You also need to sort these CARDS, and there's no doubt that TreeSet. Then go through the CARDS from the small to large, and set up a counter count. If any consecutive CARDS are found, count+ +; If found discontinuous, in 2: if count> 4, find a shunzi and save it; Instead, do nothing. And then count is equal to 1, and I'm going to start looking for a new one. Here's the code:
 To Search:
  • [duguangchi] - Reading with C51-foot grating signal, de
  • [matlabhunduchafa] - This is a gray-scale difference matlab p
  • [TreeSet] - TreeSet has n Zhang poker, this n find S
  • [webpuko] - Procedures against poker network with a
File list (Check if you may need any files):

CodeBus www.codebus.net