educative.io

Linked List / Graph Data Storage for Messages/Newsfeed

Wouldn’t just designing feeds easily be done with a Linked List and/or Graph data structure work for messages? I’m not sure how that works for a given block, but I think it’d be efficient for the problem.

1 Like

Hi @Robert_Mulligan

We really appreciated that you have shared your thoughts with us and explained them very well. It is great seeing that you guys are always coming up with betterments. We’ll look into it, your feedback is much appreciated
Thanks and have a good time on Educative :blush:

Hi @Robert_Mulligan, thanks for reaching out.
It’s good to come up with another solution. As you know, having multiple solutions lead us to select the best among all.
Currently, the FB newsfeed is implemented in LinkedHashmap (time complexity is O(1) ), which is far more efficient than LinkedList and Graph (time complexity O(N) ). I hope it will clarify.
for further reading about LinkerHashmap visit here.

1 Like