letmap=newMap()map.set(key,value)map.has(key)// true or falsemap.get(key)map.delete(key)
hashMap equivalent in Go
m=make(map[int]int)// map types are reference types so simply doing 'var m map[int]int' will not point to an initialized map and it will be nilm[key]// set valueresult:=m[key]// get value_,ok:=m[key]// returns true or false in the second paramdelete(m,key)
discrete math intro
set-roster vs. set-builder notation
set-builder example: { x ∈ reals | x ≥ 2 and x ≤ 6 }
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)