Skip to content

Instantly share code, notes, and snippets.

@tkfx
Last active July 21, 2016 15:14
Show Gist options
  • Save tkfx/82c8508a7655dcfd522a7202e0bf5d57 to your computer and use it in GitHub Desktop.
Save tkfx/82c8508a7655dcfd522a7202e0bf5d57 to your computer and use it in GitHub Desktop.
private static int isOpt(int x, int y) {
int veryHardCalculation = 0;
if (x < y) {
// this would not require a jump
veryHardCalculation = y * 1000 + x;
return veryHardCalculation;
} else {
veryHardCalculation = x * 1000 + y;
return veryHardCalculation;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment