Myntra
20+ Talentum Network Consulting Interview Questions and Answers
Q1. Dijkstra's Shortest Path Problem
Given an undirected graph with ‘V’ vertices (labeled 0, 1, ... , V-1) and ‘E’ edges, where each edge has a weight representing the distance between two connected nodes (X, Y).
Y...read more
Dijkstra's algorithm is used to find the shortest path from a source node to all other nodes in a graph with weighted edges.
Implement Dijkstra's algorithm to find the shortest path distances from the source node to all other nodes in the graph.
Use a priority queue to efficiently select the next node with the shortest distance.
Update the distances of neighboring nodes based on the current node's distance and edge weights.
Handle disconnected vertices by assigning a large value ...read more
Q2. BFS Traversal in a Graph
Given an undirected and disconnected graph G(V, E) where V vertices are numbered from 0 to V-1, and E represents edges, your task is to output the BFS traversal starting from the 0th ve...read more
BFS traversal in a disconnected graph starting from vertex 0.
Use a queue to keep track of nodes to visit next in BFS traversal
Start traversal from vertex 0 and explore its neighbors first
Continue exploring neighbors level by level until all nodes are visited
Ensure to print connected nodes in numerical sort order
Q3. Add Two Numbers as Linked Lists
You are given two singly linked lists, where each list represents a positive number without any leading zeros.
Your task is to add these two numbers and return the sum as a linke...read more
Add two numbers represented as linked lists and return the sum as a linked list.
Traverse both linked lists simultaneously while keeping track of carry from previous sum
Create a new linked list to store the sum, updating the value and carry as needed
Handle cases where one linked list is longer than the other by adding remaining digits with carry
Q4. Longest Common Subsequence Problem Statement
Given two strings STR1
and STR2
, determine the length of their longest common subsequence.
A subsequence is a sequence that can be derived from another sequence by d...read more
The task is to find the length of the longest common subsequence between two given strings.
Implement a function to find the longest common subsequence between two strings.
Use dynamic programming to solve this problem efficiently.
Iterate through the strings and build a matrix to store the lengths of common subsequences.
Return the length of the longest common subsequence found.
Q5. DFS Traversal Problem Statement
Given an undirected and disconnected graph G(V, E)
, where V
is the number of vertices and E
is the number of edges, the connections between vertices are provided in the 'GRAPH' m...read more
DFS traversal to find connected components in an undirected and disconnected graph.
Perform DFS traversal on each vertex to find connected components
Maintain a visited array to keep track of visited vertices
Print the vertices of each connected component in ascending order
Q6. Middle of a Linked List
You are given the head node of a singly linked list. Your task is to return a pointer pointing to the middle of the linked list.
If there is an odd number of elements, return the middle ...read more
Given the head node of a singly linked list, return a pointer to the middle node. If there are an odd number of elements, return the middle element. If there are even elements, return the one farther from the head node.
Traverse the linked list using two pointers, one moving one node at a time and the other moving two nodes at a time.
When the fast pointer reaches the end of the list, the slow pointer will be at the middle node.
If the number of elements is even, return the seco...read more
Q7. Huffman Coding Challenge
Given an array ARR
of integers containing 'N' elements where each element denotes the frequency of a character in a message composed of 'N' alphabets of an alien language, your task is ...read more
The task is to find the Huffman codes for each alphabet in an encoded message based on their frequencies.
The Huffman code is a binary string that uniquely represents each character in the message.
The total number of bits used to represent the message should be minimized.
If there are multiple valid Huffman codes, any of them can be printed.
The input consists of multiple test cases, each with an array of frequencies.
Implement the function to find the Huffman codes and return 1 ...read more
Q8. Trapping Rain Water Problem Statement
You are given a long type array/list ARR
of size N
, representing an elevation map. The value ARR[i]
denotes the elevation of the ith
bar. Your task is to determine the tota...read more
The question asks to find the total amount of rainwater that can be trapped in the given elevation map.
Iterate through the array and find the maximum height on the left and right of each bar.
Calculate the amount of water that can be trapped at each bar by subtracting its height from the minimum of the maximum heights on the left and right.
Sum up the amount of water trapped at each bar to get the total amount of rainwater trapped.
Q9. Path Reversals Problem Statement
You are provided with a directed graph and two nodes, 'S' and 'D'. Your objective is to determine the minimum number of edges that need to be reversed to establish a path from n...read more
The task is to find the minimum number of edges that need to be reversed in a directed graph to find the path from a start node to an end node.
The problem can be solved using graph traversal algorithms like Breadth First Search (BFS) or Depth First Search (DFS).
Start by creating an adjacency list representation of the directed graph.
Perform a BFS or DFS from the start node to the end node, keeping track of the number of edges reversed.
Return the minimum number of edges revers...read more
Q10. rain water problem
The rain water problem involves calculating the amount of rainwater that can be trapped between buildings or structures.
Calculate the maximum height of water that can be trapped at each position
Subtract the height of the building at each position to get the water level
Sum up the water levels at each position to get the total amount of trapped rainwater
Q11. Triplets with Given Sum Problem
Given an array or list ARR
consisting of N
integers, your task is to identify all distinct triplets within the array that sum up to a specified number K
.
Explanation:
A triplet i...read more
The task is to find all distinct triplets in an array that add up to a given sum.
Iterate through the array and fix the first element of the triplet.
Use two pointers approach to find the other two elements that sum up to the remaining target.
Handle duplicates by skipping duplicate elements while iterating.
Return the list of valid triplets.
Q12. Merge Two Sorted Linked Lists Problem Statement
You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.
Input:...read more
Merge two sorted linked lists into a single sorted linked list without using additional space.
Create a dummy node to start the merged list
Compare the values of the two linked lists and add the smaller value to the merged list
Move the pointer of the merged list and the pointer of the smaller value list
Continue this process until one of the lists is fully traversed
Append the remaining elements of the other list to the merged list
Q13. U have to cut a rod in such a way so that u can get each part ever day and whole rod in a week
To cut a rod in such a way that each part is obtained every day and the whole rod is obtained in a week.
Cut the rod into 7 equal parts.
Each day, use one part of the rod.
By the end of the week, all parts will be used and the whole rod will be obtained.
Q14. How u can satisfies a client for is aspects
To satisfy a client in all aspects, it is important to understand their needs, provide excellent service, maintain effective communication, and address any concerns or issues promptly.
Understand the client's needs and expectations
Provide excellent service and deliver on promises
Maintain effective communication throughout the process
Address any concerns or issues promptly and effectively
Q15. Higest nth rank and lowest rank if no of employees less than 2
If number of employees is less than 2, highest and lowest rank will be the same.
If there are less than 2 employees, both highest and lowest rank will be the same.
For example, if there is only 1 employee, their rank will be 1 which is both the highest and lowest rank.
Q16. How to insan bag and load
Insan bag and load by following proper procedures and techniques.
Ensure the bag is properly secured and stable before loading.
Use proper lifting techniques to avoid injury.
Distribute the weight evenly to maintain balance.
Follow any specific guidelines or protocols provided by the organization.
Consider the size and weight of the items being loaded to determine the best approach.
Example: When loading heavy items, use a team lift technique or mechanical aids if available.
Q17. How would you find running sum?
Running sum can be found by iterating through the array and adding each element to the sum of all previous elements.
Iterate through the array and add each element to the sum of all previous elements
Keep track of the running sum in a separate variable
Example: For array [1, 2, 3, 4], running sum would be [1, 3, 6, 10]
Q18. how many whatsapp users in bangalore
There is no accurate data available on the number of WhatsApp users in Bangalore.
WhatsApp does not release city-wise user data
Estimates suggest that there are around 200 million WhatsApp users in India
Bangalore is one of the major cities in India, so it can be assumed that there are a significant number of WhatsApp users in the city
Q19. What do have based communition skils
I have excellent communication skills, both verbal and written.
I am able to convey complex information in a clear and concise manner.
I am an active listener and able to understand the needs of my clients.
I am able to adapt my communication style to suit different audiences.
I am proficient in using various communication tools such as email, phone, and video conferencing.
I am able to build strong relationships with clients and colleagues through effective communication.
For exam...read more
Q20. How send return bag
To send a return bag, follow these steps:
Contact the shipping carrier to arrange for a return pickup or drop-off
Pack the items securely in the bag, ensuring they are protected during transit
Attach the return label provided by the seller or shipping carrier
Follow any additional instructions provided by the seller or shipping carrier
Hand over the bag to the shipping carrier or drop it off at the designated location
Q21. Why is lambda function faster?
Lambda functions are faster due to their ability to execute code without the overhead of defining a function name or structure.
Lambda functions do not require a function name, making them quicker to define and execute.
They are often used for simple operations or as arguments to higher-order functions.
Lambda functions are more concise and can be written in a single line of code.
They are particularly useful in functional programming paradigms.
Q22. Write a program on stack operations
A program for stack operations
Create a stack using an array or linked list
Implement push() and pop() functions
Check for stack overflow and underflow
Implement peek() function to view top element
Example: stack.push(5), stack.pop(), stack.peek()
Q23. Current updates of GST.
GST updates include changes in rates, return filing, and e-invoicing.
GST Council has revised rates for various goods and services.
New return filing system has been introduced to simplify the process.
E-invoicing has been made mandatory for businesses with turnover above Rs. 50 crore.
Late fee for non-filing of GSTR-3B has been waived for taxpayers with nil liability.
GST revenue collection has been consistently above Rs. 1 lakh crore for the past few months.
Top HR Questions asked in Talentum Network Consulting
Interview Process at Talentum Network Consulting
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month