Fast ways to check if an element is in a vector of vector of elements

So I have not understood the problem first. I think the big question is, how frequently you want to run this search. If once, the answer by @DNF is OK. if multiple times, you should build the index. Like

a = [[1,2,3],[4,5,6],[1,5,6]]
index = Dict{Int,Vector{Int}}()
for (i, jj) in enumerate(a)
       for j in jj
       push!(get!(index, j, Int[]), i)
       end
 end

julia> index[1]
2-element Vector{Int64}:
 1
 3
3 Likes