Generalize view id in example.
Move iqueue in separate file.
Do binary search on frequency array.