Would OJ please straighten the LRU task description?

  • 2

    There are two ambiguities in the task description. Please clarify the description, because taking the intention from the failed test cases is unnecessarily cumbersome.

    a) The description does not specify which operations count as "use", i.e. which operation should trigger an LRU status update. get and set both do, and the description should say so.

    b) The wording for set() can suggest set-only-upon-add behaviour. Consider reading: "((Set or insert) if the key is not present)". Please change to something along: "Set key, or add it if not present".

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.