Files
grokking_algorithms/05_hash_tables/julia/02_check_voter.jl
Massoud Afrashteh 9dc7611411 Julia samples (#108)
* Add julialang binary search sample

* Add unit test

* Add julialang selection sort sample

* Change julia suffix to jl

* Add recursion and quick sort with tests

* add quick sort

* Add hash table samples

* Add BFS

* Changed file names

* Add dijkstras

* Add Dijkstras test
2019-11-12 09:19:21 -06:00

14 lines
210 B
Julia

function check_vote(name)
if voted.get(name)
println("kick them out!")
else
voted[name] = true
println("let them vote!")
end
end
voted = Dict()
check_vote("tom")
check_vote("mike")
check_vote("mike")