I have read a lot about sorting tables using lists but I haven’t found one that is the same as my problem. I am trying to make a timetable app. and the main feature is that it can display the class that is the closest to the current time. The user can enter their classes on different days but it would not be sorted. For example, a user can input that class A he has at 13:05 and submits it. Afterwards he could input class B that is 12:05. in the table class A comes first before class B. i have tried using bubble sort and it wouldn’t work.

