This project is part of the Data Structures and Algorithms (DSDA) Lab for college. It implements a simplified version of a Twitter-like platform using C. The application supports user registration, posting tweets, following/unfollowing users, viewing news feeds, and searching users by name.
-
Post Tweets
Users can post tweets with a unique tweet ID and a short message. -
Follow/Unfollow Users
Users can follow or unfollow other users to manage their news feeds. -
View News Feed
Retrieve the latest tweets from followed users and display up to 10 recent tweets. -
Search Users by Username
Search for users by their username using a binary search tree for efficient lookup. -
Display Tweets
View all tweets posted by a specific user.
- Clone the repository or download the code.
git clone https://github.com/Aditya-Ranjan1234/Twitter-C-Implementation.git
- Compile the C program using a compiler like GCC:
gcc -o twitter_simulation dsda-el.c
- Run the executable:
./twitter_simulation
When running the program, you can select from the following options:
- Post a Tweet: Enter the user ID, username, tweet ID, and the message.
- Follow a User: Enter the follower ID and followee ID.
- Get News Feed: View recent tweets for a specific user ID.
- Unfollow a User: Remove a follow relationship.
- Search User by Name: Search for a user by their username and view their details.
- Exit: Exit the platform and free all allocated memory.
-
Binary Search Tree (BST):
Used for efficient user lookup by username. -
Stack:
Utilized to store and manage tweets for quick access. -
Linked List:
Stores tweets for each user.
-
Binary Search Tree for User Search:
Efficiently searches users by their username for faster results. -
Stack for News Feed:
Provides a way to retrieve the latest tweets efficiently. -
Dynamic Memory Management:
Ensures proper allocation and deallocation of memory for user and tweet data.
- Aditya Ranjan
- Gnanendra Naidu
- Ahibhruth A
- Garv Agarwalla
This project is licensed under the GNU License. See the LICENSE file for details.
- DSDA Lab Faculty for their guidance.
- Fellow classmates for brainstorming ideas.