You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should consider using an empty struct (struct{}) instead of a boolean (bool) as the map value because it won't occupy any memory. You don't actually use the value of the boolean because you check the ok return value from the map access to see if the key is in the set.
The text was updated successfully, but these errors were encountered:
Golang_Algorithm/Data_Structure/Set/set.go
Line 23 in a330783
You should consider using an empty struct (
struct{}
) instead of a boolean (bool
) as the map value because it won't occupy any memory. You don't actually use the value of the boolean because you check theok
return value from the map access to see if the key is in the set.The text was updated successfully, but these errors were encountered: