Product Intern
30+ Product Intern Interview Questions and Answers
Q1. Power Calculation Problem Statement
Given a number x
and an exponent n
, compute xn
. Accept x
and n
as input from the user, and display the result.
Note:
You can assume that 00 = 1
.
Input:
Two integers separated...read more
Calculate x raised to the power of n, given x and n as input from the user.
Accept two integers x and n as input from the user
Compute x^n and display the result
Handle the case where x=0 and n=0 separately (0^0 = 1)
Q2. Sort Array by Set Bit Count
Given an array of positive integers, your task is to sort the array in decreasing order based on the count of set bits in the binary representation of each integer.
If two numbers ha...read more
Sort the array in decreasing order based on the count of set bits in the binary representation of each integer.
Iterate through the array and calculate the set bit count for each integer using bitwise operations.
Use a custom comparator function to sort the array based on the set bit count.
Maintain the original order for integers with the same set bit count.
Modify the array in-place within the given function.
Product Intern Interview Questions and Answers for Freshers
Q3. Validate BST Problem Statement
Given a binary tree with N
nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true
; otherwise, return false
.
A binary search tree (BST) is a b...read more
Validate if a binary tree is a Binary Search Tree (BST) based on given properties.
Check if left subtree contains only nodes with data less than current node's data
Check if right subtree contains only nodes with data greater than current node's data
Recursively check if both left and right subtrees are also BSTs
Q4. Maximum Non-Adjacent Subsequence Sum
Given an array of integers, determine the maximum sum of a subsequence without choosing adjacent elements in the original array.
Input:
The first line consists of an integer...read more
Find the maximum sum of a subsequence without choosing adjacent elements in the original array.
Iterate through the array and keep track of the maximum sum of non-adjacent elements.
At each index, compare the sum of including the current element with excluding the current element.
Return the maximum sum obtained.
Example: For input [3, 2, 7, 10], the maximum sum is 13 by selecting 3 and 10.
Example: For input [3, 2, 5], the maximum sum is 8 by selecting 3 and 5.
Q5. Reverse Linked List Problem Statement
Given a singly linked list of integers, return the head of the reversed linked list.
Example:
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linked list: 4 -> 3 -> 2...read more
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.
Use three pointers to keep track of the current, previous, and next nodes while reversing the linked list.
Ensure to update the head of the reversed linked list at the end of the process.
Example: Input: 1 -> 2 -> 3 -> 4 -> NULL, Output: 4 -> 3 -> 2 -> 1 -> NULL
Q6. Colourful Knapsack Problem Statement
You are given N
stones labeled from 1 to N
. The i-th stone has the weight W[i]
. There are M
colors labeled by integers from 1 to M
. The i-th stone has the color C[i]
which i...read more
The task is to fill a Knapsack with stones of different colors and weights, minimizing unused capacity.
Given N stones with weights W and colors C, choose M stones (one of each color) to fill Knapsack with total weight not exceeding X
Minimize unused capacity of Knapsack by choosing stones wisely
If no way to fill Knapsack, output -1
Example: N=5, M=3, X=10, W=[1, 3, 3, 5, 5], C=[1, 2, 3, 1, 2] -> Output: 1
Share interview questions and help millions of jobseekers 🌟
Q7. Minimum Number of Lamps Needed
Given a string S
containing dots (.) and asterisks (*), where a dot represents free spaces and an asterisk represents lamps, determine the minimum number of additional lamps neede...read more
Determine the minimum number of additional lamps needed to illuminate a string with dots and asterisks.
Iterate through the string and check for free spaces that are not already illuminated by existing lamps
Place a lamp at each free space that is not already illuminated by an existing lamp
Consider edge cases where the first and last positions may need additional lamps
Q8. Intersection of Linked List Problem
You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.
Your task is to determine the data...read more
Find the node where two linked lists merge, return -1 if no merging occurs.
Traverse both lists to find their lengths and the difference in lengths
Move the pointer of the longer list by the difference in lengths
Traverse both lists simultaneously until they meet at the merging point
Product Intern Jobs
Q9. Colorful Knapsack Problem
You are given a set of 'N' stones, each with a specific weight and color. The goal is to fill a knapsack with exactly 'M' stones, choosing one stone of each color, so that the total we...read more
The goal is to fill a knapsack with exactly 'M' stones, one of each color, minimizing unused capacity.
Iterate through stones, keeping track of weights for each color
Sort stones by weight and color, then select one stone of each color
Calculate total weight for selected stones and find minimum unused capacity
Q10. Linked List Merge Point Problem
You are given two singly linked lists and a third linked list, such that the two lists merge at some node of the third linked list. Determine the data value at the node where thi...read more
Given two linked lists that merge at some point, find the data value at the merging node.
Traverse both lists to find their lengths and the difference in lengths
Move the pointer of the longer list by the difference in lengths
Traverse both lists simultaneously until the nodes match to find the merging node
Q11. 1>linked list node contain a string field and next.find if by concatenating all string fields the string formed is palindrome or not? 2-> merge to sorted array in which one arra is large enough to accomodate el...
read moreThe first question is about checking if a string formed by concatenating all string fields in a linked list is a palindrome or not.
Traverse the linked list and concatenate all string fields
Check if the concatenated string is a palindrome by comparing characters from both ends
Consider edge cases like empty linked list or single node with an empty string field
Q12. There are 12 people on an island with a seesaw. 11 of them have identical weight, and one has a different weight (either higher or lower). How can you find the person with the different weight using the seesaw...
read moreUse the seesaw 3 times to find the person with different weight among 12 people on an island.
Divide the 12 people into 3 groups of 4.
Compare 2 groups on the seesaw, then narrow down the group with the different person.
Take the 4 people from the identified group and compare 2 of them on the seesaw to find the person with different weight.
The Egg Dropping Puzzle is a classic problem in mathematics and computer science that involves finding the highest floor from which an egg can be dropped without breaking.
The puzzle involves finding the minimum number of attempts needed to determine the highest safe floor using only two eggs.
Strategies for solving the puzzle include binary search, dynamic programming, and optimal stopping theory.
The puzzle was discussed in the context of algorithm design and optimization duri...read more
Q14. In a party, there are n people. Arrange them into two groups such that people in each group know each other. Also, determine if no such arrangement exists.
Group n people into two knowing groups or state impossibility based on their relationships.
Use graph theory: represent people as nodes and relationships as edges.
Check if the graph is bipartite: can be colored with two colors without adjacent nodes sharing the same color.
Example: If A knows B and C, and B knows A and C, they can't be split into two groups.
If the graph contains an odd-length cycle, no valid grouping exists.
Q15. What is the difference between encoding, cryptography, and hashing?
Encoding is the process of converting data into a specific format. Cryptography is the practice of secure communication. Hashing is the process of converting data into a fixed-size string of bytes.
Encoding is used to convert data into a specific format for transmission or storage.
Cryptography involves techniques for secure communication, such as encryption and decryption.
Hashing is used to convert data into a fixed-size string of bytes, often used for data integrity verificat...read more
Q16. How do you define the Minimum Viable Product (MVP) of a product in an early-stage company?
MVP is the simplest version of a product that delivers core value to users and validates business assumptions.
Identify core user needs: Focus on the primary problem your product solves. For example, a fitness app may prioritize tracking workouts.
Build essential features: Include only the features necessary to deliver value. For instance, a task management tool might start with task creation and deadlines.
Gather user feedback: Release the MVP to early adopters and collect feed...read more
Q17. What is product management? What is product development life cycle
Product management is the process of overseeing all aspects of a product's life cycle, from ideation to launch and beyond.
Product management involves identifying customer needs and developing a product that meets those needs
It includes market research, product design, development, testing, launch, and ongoing support
Product managers work closely with cross-functional teams, including engineering, design, marketing, and sales
They are responsible for setting product strategy, p...read more
Q18. What metrics would you measure to determine the success of Swiggy?
Key metrics to measure Swiggy's success include customer retention rate, order volume, average order value, and customer satisfaction.
Customer retention rate: Percentage of customers who continue to use Swiggy over a period of time.
Order volume: Number of orders processed by Swiggy in a given time frame.
Average order value: Average amount spent by customers on each order.
Customer satisfaction: Feedback and ratings provided by customers on their experience with Swiggy.
Q19. 1. Binary tree traversal 2. Multiply 2 big numbers represented in the form of string. 3. Detect the k-th node from the back of a linked list.
Questions on binary tree traversal, multiplying big numbers represented as strings, and detecting k-th node from the back of a linked list.
Binary tree traversal can be done in three ways: in-order, pre-order, and post-order.
To multiply two big numbers represented as strings, you can use the grade-school algorithm or Karatsuba algorithm.
To detect the k-th node from the back of a linked list, you can use two pointers approach or find the length of the list first.
Q20. What is the difference between a process and a thread?
A process is an instance of a program, while a thread is a unit of execution within a process.
A process is an independent entity that runs in its own memory space, while threads share the same memory space within a process.
Processes have their own resources, such as file handles and memory, while threads share these resources.
Processes are heavyweight and have higher overhead, while threads are lightweight and have lower overhead.
Processes provide better isolation and securit...read more
Q21. How would you build amazing products?
To build amazing products, I would focus on understanding user needs, conducting thorough research, iterating based on feedback, and prioritizing simplicity and usability.
Understand user needs through research and feedback
Iterate on designs based on user feedback
Prioritize simplicity and usability in product features
Stay updated on industry trends and technologies
Q22. How would you design an app for your idea?
I would design an app for tracking personal fitness goals and progress.
Create a user-friendly interface for inputting and tracking fitness goals
Include features for tracking exercise routines, nutrition intake, and progress measurements
Provide personalized recommendations and reminders to help users stay on track
Incorporate social features to allow users to connect and motivate each other
Integrate with wearable devices and fitness trackers for seamless data syncing
Q23. How would you ship a product?
I would ship a product by determining the best shipping method, packaging it securely, and arranging for delivery.
Research and select the most cost-effective and reliable shipping carrier
Package the product securely to prevent damage during transit
Arrange for delivery and track the shipment to ensure timely arrival
Q24. What is a north star metric?
A north star metric is a key performance indicator that aligns the entire team towards a common goal.
It is a single metric that measures the success of a product or business.
It helps in focusing efforts and resources on what truly matters.
Examples include monthly active users, revenue per user, or customer retention rate.
Q25. Implement a trie with insert, search, and startsWith methods.
A trie is a tree-like data structure used for efficient searching of words or strings.
Trie is also known as prefix tree.
Each node in the trie represents a character in the word.
The root node represents an empty string.
The children of a node represent the next character in the word.
The end of a word is marked by a special character or a boolean flag.
Trie is commonly used in autocomplete and spell checking applications.
Q26. Define MOS and its real-life applications.
MOS stands for Mean Opinion Score, a metric used to measure the quality of audio or video in telecommunications.
MOS is typically rated on a scale from 1 to 5, with 5 being the best quality.
It is used in telecommunications to assess the overall user experience with audio and video calls.
MOS helps companies identify and address issues with call quality to improve customer satisfaction.
For example, a call center may use MOS to monitor and improve the quality of customer calls.
Q27. Explain C++ memory management and pointers.
C++ memory management involves allocating and deallocating memory for variables, while pointers store memory addresses.
Pointers are variables that store memory addresses.
They are used to access and manipulate data stored in memory.
Example: int* ptr = new int; *ptr = 10; delete ptr;
Q28. Given a linked list, determine if it contains a loop. Return true if there is a loop, otherwise return false.
To find a loop in a LinkedIn list, we can use Floyd's cycle-finding algorithm.
Floyd's algorithm uses two pointers, one moving at twice the speed of the other.
If there is a loop, the faster pointer will eventually catch up to the slower one.
We can then reset one of the pointers to the beginning and move both at the same speed.
Where they meet is the start of the loop.
Q29. Explain the supply chain of a book.
The supply chain of a book involves multiple stages from raw materials to distribution.
Raw materials such as paper and ink are sourced
Printing and binding process takes place
Books are packaged and shipped to distribution centers
Books are distributed to retailers or directly to customers
Returns and unsold copies may be sent back to publishers
Q30. What are the differences between new and malloc?
New is used in C++ for object creation, while malloc is a C function for memory allocation without constructor calls.
new allocates memory and calls constructors for objects, e.g., MyClass* obj = new MyClass();
malloc allocates raw memory without calling constructors, e.g., MyClass* obj = (MyClass*)malloc(sizeof(MyClass));
new returns a pointer of the appropriate type, while malloc returns a void pointer that needs casting.
new automatically handles memory deallocation with delet...read more
Q31. Drop in sign-ups, find couse?
To address drop in sign-ups, analyze user behavior, optimize onboarding process, improve marketing strategies, and enhance product features.
Analyze user behavior to identify pain points in the sign-up process
Optimize onboarding process to make it more user-friendly and efficient
Improve marketing strategies to reach target audience effectively
Enhance product features based on user feedback and market trends
Q32. Conflict management at work environment
Conflict management involves addressing and resolving disagreements or disputes in a professional manner.
Listen actively to all parties involved
Identify the root cause of the conflict
Communicate openly and honestly
Seek a win-win solution through compromise
Involve a mediator if necessary
Q33. What is the difference between an NBFC and a bank?
NBFCs are financial institutions that provide banking services without meeting the legal definition of a bank.
NBFCs cannot accept demand deposits like banks
NBFCs do not form part of the payment and settlement system and cannot issue cheques drawn on itself
NBFCs are not regulated as strictly as banks by the central bank
Examples of NBFCs include Bajaj Finance, Muthoot Finance, and L&T Finance
Q34. Given a knapsack with a maximum weight capacity W and a set of items, each with a weight wi and a value vi, determine the maximum total value of items that can be placed in the knapsack. You can take multiple i...
read moreModified unbounded knapsack problem involves maximizing the value of items with unlimited quantities and weight constraints.
Consider items with values and weights, along with a weight constraint
Dynamic programming can be used to solve this problem efficiently
Examples: Given items with values [60, 100, 120] and weights [10, 20, 30], and a weight constraint of 50, maximize the value
Q35. Implement the merge sort algorithm.
Merge sort is a divide-and-conquer algorithm that sorts an array by recursively splitting and merging sorted subarrays.
1. Divide the array into two halves until each subarray contains a single element. Example: [38, 27, 43, 3, 9, 82, 10] becomes [38, 27, 43] and [3, 9, 82, 10].
2. Recursively sort each half. Example: [38, 27, 43] becomes [27, 38, 43].
3. Merge the sorted halves back together. Example: [27, 38, 43] and [3, 9, 82, 10] merge to form [3, 9, 10, 27, 38, 43, 82].
4. T...read more
Interview Questions of Similar Designations
Top Interview Questions for Product Intern Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month