Yes, the generated pattern has to be in alphabetical order
What should I change in printresult() to make it a useful recursive function?
It has to have a runtime less than 15 seconds for pattern...
Type: Posts; User: Jesterira
Yes, the generated pattern has to be in alphabetical order
What should I change in printresult() to make it a useful recursive function?
It has to have a runtime less than 15 seconds for pattern...
This program supposes to print out all the possible solution of given the guess pattern, the number of black pegs, and the number of white pegs in a mastermind game.
In addition, it has to be done...
Is there another way to solve this problem?
Actually. At the length of 8 the program still works fine. But for some reason, I need it to work for more than a length of 15 with a runtime less than 30 second. So, what should I do? Thanks for...
There is an example of the output at the main post. If that what you mean. The length is 3, the pattern is abc and the black is 2 the white is 0.
So, the input should be the length of the pattern, the pattern itself and the number of black and white pegs.
Sorry that variable got cencored by the system, it suppose to be guess_Hit without the underscore
This is the newest version of my code. It works but it take forever to due with larger guess pattern length.
What can I do to my code to speed it up?
#include<stdio.h>
#include<stdlib.h>...
This program should print all the possible solution for a single mastermind game.
The output should look like this:
Enter the pattern length: 3
Input the guess pattern: abc
Enter the...