Flipkart | SDE - 3 | Machine Coding
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2025-01-23Added By Anonymous
Source: Link
Company: Flipkart
Role: SDE 3
Interview Stage: Machine Coding
Year: unknown
Location: unknown
Original Content:
In java
You are launching the “Flimble” app to compete in the dating apps market. Design a console application to prototype the features of “Flimble”.
Functional requirements
P0 - Basic features
Users can create their profile on the platform. A user profile may include (but not limited to) basic information like name, age, gender etc.
Users can choose their interests from a list of interests provided by the platform. Interests may include pets, football, movies, books etc.
Users can choose their partner preferences, like age range, gender etc.
Users can request the best available profile** and choose to either accept or decline. Ranking of profiles shall be basis the following order (highest to lowest)
Preferred* profiles that have already accepted the user; ordered by highest number of mutual interests.
Preferred profiles ordered by highest number of mutual interests.
Unpreferred profiles that have already accepted the user; ordered by highest number of mutual interests
* Preferred profile is one that strictly matches the partner preference of the user.
** Users should not get any unpreferred profile that has not already accepted the user
Once the user accepts or declines a profile, it should not appear in the user feed again.
If two profiles have mutually accepted each other, the matched profile moves to the user’s matched list. A user can view their matched list of profiles at any time.
Operations - create-profile, add-interests, set-partner-preference, get-best-profile, accept-profile, decline-profile, list-matched-profiles
P1 - Advanced features
To maximize the number of matched users, every time a user receives a match the likelihood of their profile appearing on another user's feed goes down. This essentially makes sure the users that don’t have matches, get prioritized.
Users can also buy boost plans which makes the user skip the queue and increase their likelihood of appearing in more user feeds.
Admins should be able to pull reports from the platform at any time. Reports may include stats like total user count, matched users count, top-n users with highest matches, user cohort size (gender, age etc).
Operations - buy-boost, show-stats
P2 - Bonus features
Users can mark a preference as strict vs lenient. If a profile fails a lenient preference, it may still get treated similar to a preferred profile but with lower ranking. E.g. preference of strict:gender:male & lenient:age:22-25, could mark a male:21 profile as preferred profile, but ranks them lower than a male:23.
Users can super-accept a profile, which will immediately rank the user highest on the receivers’ feed. Users can only super-accept once in their lifetime.
Operations - super-accept-profile
Expectations and ground rules
Code should be demo’able (very important), either by using a main driver program or reading/writing on console(i.e. STDIN/STDOUT).
Create the sample data yourself. Add minimum 5-6 profiles to test your application. You can put it into a file, test case or main driver program itself.
Avoid writing monolithic or all-in-one file code. Code should be readable, modular, testable, extensible. Follow proper naming conventions of your programming language. It should be easy to add/remove functionality without rewriting the entire codebase.
Code should handle edge cases properly and fail gracefully.
Don’t use any database, store all the data in memory.
You are free to use any popular programming language of your choice.
Usage of any AI powered tools such a chatGPT or github-copilot is strictly prohibited. You may use the internet to look up any syntactic references.
The p2 bonus features are optional. Attempt them only after finishing the p0 & p1 features.
The problem may require you to make certain assumptions. Do make reasonable assumptions and convey them to the review panel.
Role: SDE 3
Interview Stage: Machine Coding
Year: unknown
Location: unknown
Original Content:
In java
You are launching the “Flimble” app to compete in the dating apps market. Design a console application to prototype the features of “Flimble”.
Functional requirements
P0 - Basic features
Users can create their profile on the platform. A user profile may include (but not limited to) basic information like name, age, gender etc.
Users can choose their interests from a list of interests provided by the platform. Interests may include pets, football, movies, books etc.
Users can choose their partner preferences, like age range, gender etc.
Users can request the best available profile** and choose to either accept or decline. Ranking of profiles shall be basis the following order (highest to lowest)
Preferred* profiles that have already accepted the user; ordered by highest number of mutual interests.
Preferred profiles ordered by highest number of mutual interests.
Unpreferred profiles that have already accepted the user; ordered by highest number of mutual interests
* Preferred profile is one that strictly matches the partner preference of the user.
** Users should not get any unpreferred profile that has not already accepted the user
Once the user accepts or declines a profile, it should not appear in the user feed again.
If two profiles have mutually accepted each other, the matched profile moves to the user’s matched list. A user can view their matched list of profiles at any time.
Operations - create-profile, add-interests, set-partner-preference, get-best-profile, accept-profile, decline-profile, list-matched-profiles
P1 - Advanced features
To maximize the number of matched users, every time a user receives a match the likelihood of their profile appearing on another user's feed goes down. This essentially makes sure the users that don’t have matches, get prioritized.
Users can also buy boost plans which makes the user skip the queue and increase their likelihood of appearing in more user feeds.
Admins should be able to pull reports from the platform at any time. Reports may include stats like total user count, matched users count, top-n users with highest matches, user cohort size (gender, age etc).
Operations - buy-boost, show-stats
P2 - Bonus features
Users can mark a preference as strict vs lenient. If a profile fails a lenient preference, it may still get treated similar to a preferred profile but with lower ranking. E.g. preference of strict:gender:male & lenient:age:22-25, could mark a male:21 profile as preferred profile, but ranks them lower than a male:23.
Users can super-accept a profile, which will immediately rank the user highest on the receivers’ feed. Users can only super-accept once in their lifetime.
Operations - super-accept-profile
Expectations and ground rules
Code should be demo’able (very important), either by using a main driver program or reading/writing on console(i.e. STDIN/STDOUT).
Create the sample data yourself. Add minimum 5-6 profiles to test your application. You can put it into a file, test case or main driver program itself.
Avoid writing monolithic or all-in-one file code. Code should be readable, modular, testable, extensible. Follow proper naming conventions of your programming language. It should be easy to add/remove functionality without rewriting the entire codebase.
Code should handle edge cases properly and fail gracefully.
Don’t use any database, store all the data in memory.
You are free to use any popular programming language of your choice.
Usage of any AI powered tools such a chatGPT or github-copilot is strictly prohibited. You may use the internet to look up any syntactic references.
The p2 bonus features are optional. Attempt them only after finishing the p0 & p1 features.
The problem may require you to make certain assumptions. Do make reasonable assumptions and convey them to the review panel.