MAQ Software
20+ Blossom Kochhar Beauty Products Interview Questions and Answers
Q1. Find the Duplicate Number Problem Statement
Given an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Your tas...read more
Q2. Sort 0 1 2 Problem Statement
Given an integer array arr
of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.
Input:
The first line contains an integer 'T' representing the number of...read more
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
Q4. Buy and Sell Stock Problem Statement
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell transa...read more
Q5. N Queens Problem
Given an integer N
, find all possible placements of N
queens on an N x N
chessboard such that no two queens threaten each other.
Explanation:
A queen can attack another queen if they are in the...read more
Q6. Pair Sum Problem Statement
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Note:
Each pa...read more
Q7. 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
Q8. Character Frequency Problem Statement
You are given a string 'S' of length 'N'. Your task is to find the frequency of each character from 'a' to 'z' in the string.
Example:
Input:
S : abcdg
Output:
1 1 1 1 0 0 ...read more
Q9. Reverse Only Letters Problem Statement
You are given a string S
. The task is to reverse the letters of the string while keeping non-alphabet characters in their original position.
Example:
Input:
S = "a-bcd"
Ou...read more
Q10. Sum of Digits Problem Statement
Given an integer 'N', continue summing its digits until the result is a single-digit number. Your task is to determine the final value of 'N' after applying this operation iterat...read more
Q11. Nth Fibonacci Number Problem Statement
Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2)
, with initial conditions F(1) = F(2) = 1
.
Input:
The inp...read more
Q12. Fibonacci Number Verification
Identify if the provided integer 'N' is a Fibonacci number.
A number is termed as a Fibonacci number if it appears in the Fibonacci sequence, where each number is the sum of the tw...read more
Q13. Pancake Sorting Problem Statement
You are given an array of integers 'ARR'. Sort this array using a series of pancake flips. In each pancake flip, you need to:
Choose an integer 'K' where 1 <= 'K' <= ARR.LENGTH...read more
Q14. Circular Linked List Detection
You are provided with the head of a linked list containing integers. Your task is to determine if the linked list is circular.
Note:
- A linked list is considered circular if it co...read more
Q15. Reverse Array Elements
Given an array containing 'N' elements, the task is to reverse the order of all array elements and display the reversed array.
Explanation:
The elements of the given array need to be rear...read more
Q18. find the occurrence of each element in an array
Count the occurrence of each element in an array of strings
Iterate through the array and use a hashmap to store the count of each element
If element already exists in the hashmap, increment its count by 1
Return the hashmap with element counts
Q19. sort a vector according to other other vector ?
Sort a vector based on another vector
Use std::sort with a custom comparator function
The comparator function should compare the indices of the elements in the second vector
The first vector should be sorted based on the order of the indices in the second vector
Q20. Minimum swaps to group all ones together
The minimum number of swaps needed to group all ones together in an array of 0s and 1s.
Iterate through the array to count the total number of ones.
Use a sliding window of size equal to the total number of ones to find the window with the minimum number of zeros.
Calculate the number of swaps needed to move all ones to that window.
Q21. Zigzag traversal of binary tree
Zigzag traversal of binary tree involves alternating the direction of traversal at each level.
Use a queue to perform level order traversal of the binary tree.
For each level, alternate between adding nodes to the result list from left to right and right to left.
Continue this process until all levels have been traversed.
Q22. Sort 0,1,2 array
Sort an array of strings containing '0', '1', and '2'.
Use counting sort algorithm to count the occurrences of '0', '1', and '2'.
Create a new array with the sorted counts of '0', '1', and '2'.
Join the sorted array back into a single array of strings.
Top HR Questions asked in Blossom Kochhar Beauty Products
Interview Process at Blossom Kochhar Beauty Products
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month