-
Notifications
You must be signed in to change notification settings - Fork 2
lineup
bradendubois edited this page Nov 24, 2021
·
12 revisions
ID: lineup
Difficulty: 1.9
CPU Time: 1 second
Memory: 1024 MB
For this, one can read in all the names, but put them on two lists, one of which is for the original order, and one that can be adjusted. Sort the second list, and then check if the two lists have a matching ordering; if so, "INCREASING". If not, reverse the second list and check again; a match means "DECREASING". Otherwise, "NEITHER".