Discrete Frequency Distribution Calculator - Coding problem | OneNoughtOne