Skip to content

Instantly share code, notes, and snippets.

@piusayowale
Created July 9, 2022 08:37
Show Gist options
  • Save piusayowale/59655fcbc2a4a29b3c864fbf5325a551 to your computer and use it in GitHub Desktop.
Save piusayowale/59655fcbc2a4a29b3c864fbf5325a551 to your computer and use it in GitHub Desktop.
class Checker{
public:
// complete this method
static int comparator(Player a, Player b) {
if (a.score < b.score) {
return -1;
} else if (a.score > b.score) {
return 1;
} else if(a.name > b.name){
return -1;
}else {
return 1;
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment