Visit Transaction Frequency Distribution - Coding problem | OneNoughtOne