Introduction to the Chat List Project

Get an overview of the chat list project that we'll create in this chapter.

In this chapter, we will complete another advanced project by using the least recently used (LRU) caching, linked lists, and hashmaps. The project aims to create a chat list similar to chatting applications such as WhatsApp, Telegram, and so on. Our main focus in this project will be on two aspects:

  1. The receipt of a new message: The appearance of which will depend on the following:

    1. If there was a chat already present in the chat list for a particular user, then the chat of the user needs to come at the top of the chat list.

    2. If there was no chat present for that user, then a new chat has to be added at the top of the chat list.

  2. The deletion of a message: For simplicity, we will just remove the chat for that particular user from the chat list and rearrange the chat list.

This may sound easy, but we are going to follow an optimized approach to implement this project using linked lists and hashmaps, so that the insertion of a new chat, updating of the chat list, and rearranging of the chats execute within time complexity.

You can explore the complete project below:

Get hands-on with 1200+ tech skills courses.