The normal way
The number of minutes in one day can be calculated in the following manner.
A day has 24 hours
Each hour has 60 minutes
So to get the number of minutes in a day you multiply the number of hours with the number of minutes and in that case it’s;
24 hours multiply by 60minutes which gives the answer as 1440.
Now 1440 is the total number of minutes in a day.
Since we’re only dealing with 4⋅24⋅60 items the simplest algorithm would do. Loop over all times in ascending order, create 4-digit string for each, list the 4 possible rotations, delete any that are not valid times, sort the remaining valid times in ascending order. Rotated 4 ways, by 0, 1, 2 or 3 places. For example:
Scientifically there are 23 hours and 56 minutes in a day. That is to say there is less 4 minutes in every day 24.
So to get minutes in one day you multiply
23 hours by 60 minutes and there you get 1380
So 23 hours has 1380 minutes and then you add the last 56 minutes
1380 + 56 = 1436 minutes.
Find out also the number of seconds in day here.