MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / Pair

Class Pair

LongestHappyString.java:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46class Pair implements Comparable<Pair> {
47 int count;
48 char ch;
49 Pair(int count, char ch){
50 this.count = count;
51 this.ch = ch;
52 }
53 public int compareTo(Pair that){
54 return that.count - this.count; // dec order of count
55 }
56}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected