Created
February 23, 2019 20:52
-
-
Save otaruMendez/3e3a339cd5bf69a1ce6d9732ec6e471f to your computer and use it in GitHub Desktop.
The Pizza Class for Hashcode Pizza Question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pizza { | |
int rows; | |
int cols; | |
int minIngredientEachPerSlice; | |
int maxCellsPerSlice; | |
HashMap<String, Cell> cells; | |
int rowLength; | |
int colLength; | |
public String getCellHashKey (int x, int y) { | |
return String.format("%0" + rowLength + "d", x) + String.format("%0" + colLength + "d", y); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment