Merge pull request #1456 from hrodward/patch-1

Update task.md
This commit is contained in:
Ilya Kantor 2019-10-15 22:26:26 +03:00 committed by GitHub
commit 13ca92d478
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ let messages = [
Your code can access it, but the messages are managed by someone else's code. New messages are added, old ones are removed regularly by that code, and you don't know the exact moments when it happens. Your code can access it, but the messages are managed by someone else's code. New messages are added, old ones are removed regularly by that code, and you don't know the exact moments when it happens.
Now, which data structure you could use to store information whether the message "have been read"? The structure must be well-suited to give the answer "was it read?" for the given message object. Now, which data structure could you use to store information whether the message "has been read"? The structure must be well-suited to give the answer "was it read?" for the given message object.
P.S. When a message is removed from `messages`, it should disappear from your structure as well. P.S. When a message is removed from `messages`, it should disappear from your structure as well.