L-8 leetcode 355. Design Twitter | heaps | leetcode daily challenge | Java DSA | Hindi

preview_player
Показать описание
Problem Name:
355. Design Twitter

Problem Statement:
Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user's news feed.

Implement the Twitter class:

Twitter() Initializes your twitter object.
void postTweet(int userId, int tweetId) Composes a new tweet with ID tweetId by the user userId. Each call to this function will be made with a unique tweetId.
List Integer getNewsFeed(int userId) Retrieves the 10 most recent tweet IDs in the user's news feed. Each item in the news feed must be posted by users who the user followed or by the user themself. Tweets must be ordered from most recent to least recent.
void follow(int followerId, int followeeId) The user with ID followerId started following the user with ID followeeId.
void unfollow(int followerId, int followeeId) The user with ID followerId started unfollowing the user with ID followeeId.

Problem link:

Complete Balanced Trees Playlist:

Java Plus DSA Placement Course Playlist:

Java Plus DSA Sheet:

Notes:

Telegram Link:

Ultimate Recursion Series Playlist:

Samsung Interview Experience:

Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung

Timestamp:
0:00 - Introduction

#ShashwatTiwari #coding​​ #problemsolving​
Рекомендации по теме
Комментарии
Автор

Really nice explanation. Please keep it up

ramkiran
Автор

10:31 Dimag hai hi nahi sir lagaye kha se

jacklockley
Автор

That getnewsfeed part is not n*10log10 it is n*10log(n*10) if u had just taken a minheap then polled everytime pq had 10+ elements then it would have been log10

swish
Автор

Sir please upload further videos I have placements and I want to learn from you please sir please
Thank you ❤

Simplesimpler
Автор

can you please provide this code in your git repository

SakshiBhatankar
Автор

thank you so much bhaiya for amazing explanation

SandhyaJha-iw
Автор

@shahCode one question here:
Do we really need to use these Data structures and these implementation strategies when dealing with real time?

I have another thought that in real time we will be using a database and handling millions of requests. So there would be multiple factors such as network calls, memory, scalability, database type, query optimization etc. So most probably we will rely on writing these logics at the database level not in application code.

Please put your thoughts also. So that our college students or freshers can also have these aspects.
If this video is only for cracking interviews. Then a really good approach.

ashutoshsrivastava
Автор

Bhaiya Please Graph start kar do. Please.

SH_
welcome to shbcf.ru