Use better data structure.