KingHarem16
✅ Specific Sorting Algorithm
Hey i have been breaking my head about this problem and i have no clue how to solve this.
Im a trainee Developer in Germany and i have been assigned to develop a WebApi and a Website with a Table that needs to show Shipments which are about to be due.
I have a DataModel with different fields like Desired Shipment Date (Type: DateTime), Last Possible Shipment Date, Punctual (Type: Boolean) and various other field but these dont matter for this problem.
So now i have got a unsorted List of these models, which i have to sort after certain criterias:
So they have to be sorted first after their last possible Shipment Date in ascending Order, if that date is already due then the records have to be sorted after the punctual flag with the Shipment Date.
I really dont know how to implement this and looking at least for a lead in the right direction.
96 replies