can any body give the logic of this problem 15 puzzle problem
0 Answers
can any body give the logic of this problem 15 puzzle problem
| Flag | PURGE
Method: getRandomNumbersForGrid()
public int[] getRandomNumbersForGrid() {
int arr[] = new int[15];
// write the logic for the method
return arr;
}
Hint:
The base class has a method called getRandomNumber() which will return some random integer
value.
Usage:
int randomInt = getRandomNumber(); // how to call this method…
Use this method to generate a random integer value. This can be any value and make sure you
trim it down to some value between 1 to 15.
Fill the array ‘arr’ with random numbers from 1 to 15 without repeating any of the
numbers. This will help in populating the grid with randomly generated numbers
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.