Circular Queue Implementation & Max profit