Bug Report for https://neetcode.io/problems/clone-graph
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Node does not conform to hashable in Swift:
Below has to be done to make it work
extension Node: Hashable, Equatable {
static func == (lhs: Node, rhs: Node) -> Bool {
lhs === rhs
}
func hash(into hasher: inout Hasher) {
hasher.combine(ObjectIdentifier(self))
}
}
Bug Report for https://neetcode.io/problems/clone-graph
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Node does not conform to hashable in Swift:
Below has to be done to make it work