Home > Article > Backend Development > There is a set of data that is greater than or equal to 12, and the specific number is uncertain. I want to get 12 displays every six minutes, and when there are not enough, I have to make up for it. What is the general idea? Help!!!!
For example, there are 15 arrays. The first time is 0-11, the second time is 1-12, the third time is 2-13, the fourth time is 3-14, the fifth time is 4-14. Take 5-0 five times (since there are only 15, you can’t take 12 starting from 5, so you have to take 0 to fill the place), and so on, take it every six minutes, please give a general idea,