SquadStack
20+ Cosmo Films Interview Questions and Answers
Q1. Left View of a Binary Tree
Given a binary tree, your task is to print the left view of the tree. The left view of a binary tree contains the nodes visible when the tree is viewed from the left side.
Input:
The ...read more
The task is to print the left view of a binary tree, which contains the nodes visible when viewed from the left side.
Traverse the binary tree level by level and keep track of the leftmost node at each level.
Use a queue for level order traversal and maintain a count of nodes at each level.
Print the leftmost node at each level to get the left view of the binary tree.
Q2. Arithmetic Expression Evaluation Problem Statement
You are provided with a string expression
consisting of characters '+', '-', '*', '/', '(', ')' and digits '0' to '9', representing an arithmetic expression in...read more
Evaluate arithmetic expressions in infix notation with given operators and precedence rules.
Parse the infix expression to postfix using a stack and then evaluate the postfix expression using another stack
Handle operators precedence and associativity while converting to postfix
Use a stack to keep track of operands and operators during evaluation
Ensure to handle parentheses properly to maintain correct order of operations
Q3. Reverse Words in a String: Problem Statement
You are given a string of length N
. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading or trai...read more
Reverse words in a string word by word, removing leading/trailing spaces and extra spaces between words.
Split the input string by spaces to get individual words
Reverse the order of the words
Join the reversed words with a single space in between
Remove any leading or trailing spaces
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. Maximum Subarray Sum Problem Statement
Given an array of integers, determine the maximum possible sum of any contiguous subarray within the array.
Example:
Input:
array = [34, -50, 42, 14, -5, 86]
Output:
137
E...read more
Find the maximum sum of any contiguous subarray within an array of integers.
Iterate through the array and keep track of the maximum sum of subarrays encountered so far.
At each index, decide whether to include the current element in the subarray or start a new subarray.
Update the maximum sum if a new maximum is found.
Time complexity should be O(N) to iterate through the array once.
Example: For array [34, -50, 42, 14, -5, 86], the maximum subarray sum is 137.
Q6. Find Duplicates in an Array
Given an array ARR
of size 'N', where each integer is in the range from 0 to N - 1, identify all elements that appear more than once.
Return the duplicate elements in any order. If n...read more
Identify duplicate elements in an array of integers within a specified range.
Iterate through the array and keep track of the frequency of each element using a hashmap.
Return elements with frequency greater than 1 as duplicates.
Handle edge cases such as empty array or no duplicates found.
Example: For input [0, 3, 1, 2, 3], output should be [3].
Q7. Covid Vaccination Distribution Problem
As the Government ramps up vaccination drives to combat the second wave of Covid-19, you are tasked with helping plan an effective vaccination schedule. Your goal is to ma...read more
The task is to plan an effective vaccination schedule to maximize the number of vaccines administered on a particular day, while adhering to certain rules.
Given 'n' days for vaccination drive, 'maxVaccines' available, and 'dayNumber' to maximize vaccines on.
Distribute vaccines each day with a positive number, ensuring the difference between consecutive days is not more than 1.
Output the maximum number of vaccines administered on the specified 'dayNumber'.
Example: For n=3, day...read more
Q8. Factorial of a Number Problem Statement
You are provided with an integer 'N'. Your task is to calculate and print the factorial of 'N'. The factorial of a number 'N', denoted as N!, is the product of all positi...read more
Calculate and print the factorial of a given integer 'N'.
Iterate from 1 to N and multiply each number to calculate factorial
Handle edge cases like N=0 or N=1 separately
Use recursion or iterative approach to calculate factorial
Designing a parking lot system involves layout planning, ticketing system, payment methods, security measures, and efficient traffic flow.
Layout planning to maximize space and accommodate different types of vehicles
Implementing a ticketing system for entry and exit tracking
Offering various payment methods such as cash, credit card, and mobile payments
Installing security measures like CCTV cameras and automated gates
Ensuring efficient traffic flow with clear signage and design...read more
ACID properties are a set of properties that guarantee reliability and consistency in database transactions.
Atomicity: Ensures that all operations in a transaction are completed successfully or none at all.
Consistency: Ensures that the database remains in a consistent state before and after the transaction.
Isolation: Ensures that the execution of multiple transactions concurrently does not interfere with each other.
Durability: Ensures that once a transaction is committed, its...read more
Q11. How would you approach selling a different brand of phone to a customer who has been happily using a Samsung phone for the past two years?
I would highlight the unique features and benefits of the new phone, address any concerns the customer may have, and offer a trial period or money-back guarantee.
Highlight the unique features and benefits of the new phone compared to Samsung.
Address any concerns the customer may have about switching brands.
Offer a trial period or money-back guarantee to alleviate any hesitation.
Provide excellent customer service and follow-up to ensure satisfaction.
Q12. How would you persuade me to obtain a new credit card if I already have five?
I would highlight the unique benefits and rewards of the new credit card, such as higher cash back rates or exclusive travel perks.
Emphasize the additional benefits and rewards offered by the new credit card compared to the existing ones.
Highlight any special promotions or sign-up bonuses that come with the new credit card.
Explain how having multiple credit cards can actually improve credit utilization and potentially boost credit score.
Offer personalized recommendations base...read more
Q13. Guesstimate on planes taking off and landing at Delhi airport everyday
Approximately 1,200 planes take off and land at Delhi airport everyday.
Delhi airport is one of the busiest airports in India
On average, there are around 600 flights taking off and 600 flights landing daily
Peak hours may see more flights taking off and landing
Factors like weather conditions and air traffic control can affect the number of flights
Q14. How would you you get to purchase a mobile phone to your parents
Q15. If there is any target even then you are comfortable
Inner Join is a type of SQL join that returns only the rows with matching values in both tables.
Inner Join combines rows from two tables based on a related column between them
It returns only the rows where there is a match between the columns in both tables
Non-matching rows are not included in the result set
Q17. Deep & Shallow copy meaning
Deep copy creates a new object and recursively copies all nested objects, while shallow copy creates a new object and copies only the top-level properties.
Deep copy creates a new object with its own memory space, while shallow copy creates a new object that references the same memory space as the original object.
Deep copy is more memory-intensive and time-consuming compared to shallow copy.
Example: Deep copy - copying an array of objects where each object has its own properti...read more
Q18. Willing to relocate Noida
Yes, I am willing to relocate to Noida for the right opportunity.
I am open to relocating for a promising career opportunity in Noida.
I have researched the area and am comfortable with the idea of moving there.
I believe that the potential growth and learning opportunities in Noida make it a great choice for my career.
I am excited about the prospect of working in a new environment and meeting new people.
I am confident that I can adapt quickly to the new location and thrive in m...read more
Q19. Introduction of urself
I am a highly motivated individual with excellent communication skills and a passion for customer service.
I have experience in customer service and sales
I am proficient in using CRM software
I am a quick learner and can adapt to new situations easily
Q20. any ai tools you use for designing
Yes, I use Adobe Illustrator and Canva for designing.
I use Adobe Illustrator for creating vector graphics and illustrations.
I use Canva for designing social media graphics, presentations, posters, and more.
Q21. Ur expertise in your field
I have 3 years of experience in telemarketing and customer service, with a proven track record of meeting and exceeding sales targets.
3 years of experience in telemarketing and customer service
Proven track record of meeting and exceeding sales targets
Top HR Questions asked in Cosmo Films
Interview Process at Cosmo Films
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month