Skip to the content.

Course Name: Algorithmic Problem Solving
Course Code: 23ECSE309
Course Instructor: Prakash Hegade
Name: Devaj Sanghvi
USN: 01FE21BCI055
University: KLE Technological University, Hubballi-31
Portfolio domain: Instagram

Table of Contents

Introduction

Welcome to my Instagram Portfolio, where I present the knowledge I’ve gained from the Algorithmic Problem Solving (APS) course taught at KLE Technological University. During this course, I explored the various algorithms and data structures, focusing on their practical applications in real-world situations. This portfolio showcases these learnings through various business cases, each highlighting a different aspect of algorithmic problem-solving and its importance in enhancing social media management.

Why Instagram?

Instagram-algorithm

Instagram is a widely popular social media platform originally launched in 2010, primarily focused on sharing photos and videos. Over the years, Instagram has expanded its features to include stories, IGTV, Reels and many more. With over 2 billion monthly active users [1], 46,740 photos are posted per minute by users [2]. Instagram generated an estimated $60.3 billion revenue in 2023, accounting for almost 44% of Facebook’s total revenue [3]. Instagram users watch 17.6 million hours of reels per day [4]. Leading countries by Instagram users are India, USA, Brazil, Indonesia, Turkey [5].

To handle such amount of large data, Instagram must be using advanced data structures and algorithms under the hood. By examining existing and potential use cases for these technologies, this portfolio aims to provide a comprehensive understanding of their impact on the platform.

Objectives

Business Cases

1. #️⃣ Autocomplete Hashtag Searches

Use Case

one
Flow diagram illustrating the process of hashtag autocompletion

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

autocomplete
Hashtag autocompletion in instagram

Code for Tries


2. 🌎 Geolocation Services

Use Case

two

Architecture showing the use of KD-Tree for geotagged content

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

geotagged
Geotagged post in instagram

Code for KD-Tree [6]


3. 🔔 Event Scheduling and Reminders

Use Case

three_mediumcom

Binary Search Tree [7]

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Binary Search Tree


4. 🔗 Finding Connections

Use Case

four
A simple graph depicting users and whom they are following

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for BFS


5. 🌎 Optimizing Content Delivery Network (CDN) Connections

Use Case

mst_medium
Minimum Spanning Tree [8]

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Kruskal’s Algorithm
Code for Prim’s Algorithm


6. 👍 Engagement Metrics Calculation

Use Case

six

Sequence diagram illustrating the use of lookup table to store engagement metrics

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Lookup Table


7. 1️⃣ Feed Generation and Ranking

Use Case

seven
Flow diagram illustrating the process of assigning priority to posts

Challenges

Market Benefits

DSA Used and Performance Analysis

Code for Priority Queue [9]


8. 👀 Story Viewing Sequence

Use Case

deque_learnersbucket

Basic deque operations [10]

Challenges

Market Benefits

DSA Used and Performance Analysis

Code for Deque [11]


9. 📷 Image and Video Compression

Use Case

nine

An overview of how images and videos are compressed and decompressed for storage optimization

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Huffman Coding


10. 🔒 Securing User Data Using Hashing Algorithms

Use Case

ten
High level diagram illustrating hashing of passwords

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for cryptographic hash function


11. 📢 Ad placement on Instagram

Use Case

ad_nanos

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Assignment Problem


12. ❌ Content Filtering and Moderation

Use Case

bloomfilter_linkedin

Working of Bloom Filter [12]

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for bloom filters [13]


13. ⏰ Time Series Data Analysis

Use Case

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Segment Tree [14]


14. 🔍 Content Similarity Analysis

Use Case

lcs_boardInfinity

Longest Common Subsequence [15]

Challenges

Market Benefits

DSA Used, Design Technique and Performance Analysis

Code for Longest Common Subsequence


15. 📶 Sort User’s Following List

Use Case

Market Benefits

DSA Used, Design Technique and Performance Analysis

sorting_funv
Find the sorted order in which you followed other accounts

Code for Merge Sort
Code for Quick Sort

Conclusion

This portfolio highlights how essential algorithms and data structures are to Instagram’s success. The features we enjoy on Instagram, such as stories, reels and posts, rely on these technical elements to operate seamlessly and manage vast amounts of data.
The business cases demonstrate the practical application of skills learned in the Algorithmic Problem Solving course. This portfolio aims to be a valuable resource for those interested in the tech behind social media. Understanding these tools helps us enhance platforms like Instagram, ensuring they remain efficient, innovative, and user-friendly.

References

[1] “Topic: Instagram,” Statista, Apr. 24, 2024. https://www.statista.com/topics/1882/instagram/

[2] B. Marr, “How much data do we create every day? The Mind-Blowing Stats Everyone should read,” Bernard Marr, Jul. 13, 2021. https://bernardmarr.com/how-much-data-do-we-create-every-day-the-mind-blowing-stats-everyone-should-read/

[3] “Instagram Revenue and Usage Statistics (2024) - Business of Apps,” Business of Apps, Apr. 18, 2024. https://www.businessofapps.com/data/instagram-statistics/

[4] J. Santora, “16 key Instagram Reels Statistics for Marketers to know,” Influencer Marketing Hub, Dec. 22, 2023. https://influencermarketinghub.com/instagram-reels-stats/

[5] “Instagram Users by country [Jun 2024 Update] | Oberlo,” Oberlo. https://www.oberlo.com/statistics/instagram-users-by-country

[6] GeeksforGeeks, “Search and Insertion in K Dimensional tree,” GeeksforGeeks, Jun. 13, 2023. https://www.geeksforgeeks.org/search-and-insertion-in-k-dimensional-tree/

[7] G. Arkin, “Binary Search Tree in JavaScript - the startup - medium,” Medium, Mar. 30, 2022. [Online]. Available: https://medium.com/swlh/binary-search-tree-in-javascript-31cb74d8263b

[8] Pranav, “ADA - Pranav - Medium,” Medium, Oct. 30, 2023. [Online]. Available: https://medium.com/@bparash16/a-3bb03592c74b

[9] GeeksforGeeks, “Priority Queue using Binary Heap,” GeeksforGeeks, Jun. 07, 2024. https://www.geeksforgeeks.org/priority-queue-using-binary-heap/

[10] P. Yadav, “Implement deque data structure in javascript - LearnersBucket,” LearnersBucket, Sep. 04, 2019. https://learnersbucket.com/tutorials/data-structures/implement-deque-data-structure-in-javascript/

[11] “Deque (Data Structures) - javatpoint,” www.javatpoint.com. https://www.javatpoint.com/ds-deque

[12] G. Pandey, “Bloom Filter - a probabilistic data structure,” Aug. 13, 2023. https://www.linkedin.com/pulse/bloom-filter-probabilistic-data-structure-gaurav-pandey

[13] GeeksforGeeks, “Bloom Filters Introduction and Implementation,” GeeksforGeeks, Apr. 03, 2024. https://www.geeksforgeeks.org/bloom-filters-introduction-and-python-implementation/

[14] Manish, “C++ program to implement segment Tree,” Sanfoundry, May 19, 2022. https://www.sanfoundry.com/cpp-program-to-implement-segment-tree/

[15] B. Infinity, “Longest Common Subsequence problem: solved | Board Infinity,” Board Infinity, Jul. 09, 2023. https://www.boardinfinity.com/blog/longest-common-subsequence-problem-solved/