The current solution for problem 149 works and is relatively quick, with one Caveat. Our first step is to count the number of repeats of a given point. We currently do this by use of a Dictionary with Point as a key. Since point is not a transparent Class, this requires us to override the Equality and GetHashCode methods for point. Doing so is trivial but is not something we can do on the LeetCode website (since there we do not define Point, it is given to us).
The fix is to cast Points to our own class where we have overridden these methods, but doing so is a little time consuming, and right now seems utterly pointless as it adds nothing to the solution. I will eventually do it though....
The current solution for problem 149 works and is relatively quick, with one Caveat. Our first step is to count the number of repeats of a given point. We currently do this by use of a Dictionary with Point as a key. Since point is not a transparent Class, this requires us to override the Equality and GetHashCode methods for point. Doing so is trivial but is not something we can do on the LeetCode website (since there we do not define Point, it is given to us).
The fix is to cast Points to our own class where we have overridden these methods, but doing so is a little time consuming, and right now seems utterly pointless as it adds nothing to the solution. I will eventually do it though....