An O(n) solution where no_of_days is an array of days mapped with fruits