主权项 |
1. A method comprising:
receiving a current user name at a current arrival time at a computer; inputting the current user name into a hash function; using the hash function to determine an index in an array corresponding to the current user name; retrieving a previous user name and a previous arrival time stored in the array at the index; transforming the array by replacing the previous user name and the previous arrival time with the current user name and the current arrival time in the array at the index; and inserting the previous user name and the previous arrival time into a nearest eligible sequential index in the array, the inserting comprising
incrementing the index to a first incremented index, wherein the array at the first incremented index contains a third user name and a third arrival time,determining whether the previous arrival time is more recent than the third arrival time,in response to determining that the previous arrival time is more recent than the third arrival time, retrieving the third user name and the third arrival time,after retrieving the third user name and the third arrival time, transforming the array by replacing the third user name and the third arrival time with the previous user name and previous arrival time in the array at the first incremented index, andinserting the third user name and the third arrival time into a nearest eligible sequential index in the array. |