Found this interview question and trying to solve it with Java.
Q:Design a function to gives real time statistics of your web traffic,count one day's website visit ,count one week's website visit.
I understand that this will require a circular data structure. Which one will be appropriate in case of Java implementation CircularBuffer
or Circular LinkedList
.
If circular buffer is not right solution then what is?