sam wants to leave a secret message for kim they share an office on different shifts 5189172
Sam wants to leave a secret message for Kim. They share an office on different shifts in the data backup and recovery division of the Umbrella Corporation. They will leave a post-it note in the top drawer of a filing cabinet they share if they want to give each other a secret message. Each can check when they arrive on their shift, however Malfoy can snoop on them and read the message that is left for each because the top drawer of the filling cabinet is unlocked.
They decide to use a locking solution on the filing cabinet drawer. However, they only want one key each, and NOT the shared keys for the lock. Kim says why don’t they use two locks, but she cannot figure out how to lock the drawer without a hidden key to her lock and Sam’s lock put somewhere that Malfoy cannot find. If they drawer on the filing cabinet can accommodate two locks, how can this be solved?
Write an ALGORITHM that solves the problem with Kim and Sam only having one key to their respective lock, and there are no keys to the locks hidden from Malfoy. The algorithm should also solve the problem of communicating between Kim and Sam that one of them left a message for the other by virtue of using the locks and the single filing cabinet drawer. Hint: it should be atlest 15 to 20 lines. Thanks