Gameskraft
10+ Cinépolis Interview Questions and Answers
Q1. Unique paths from top left of a binary tree to bottom right.
Count the number of unique paths from top left to bottom right in a binary tree.
Use dynamic programming to keep track of the number of paths at each node.
At each node, the number of paths is the sum of the number of paths from the node to the right and the node below.
Example: For a 2x2 binary tree, there are 2 unique paths.
Q2. Maximum triplet sum such that i
Find the maximum triplet sum satisfying given conditions
Sort the array in ascending order
Iterate through the array and keep track of the maximum triplet sum meeting the conditions
Return the maximum triplet sum found
Q3. Coin change Problem of finding number of ways to achieve K value
The coin change problem involves finding the number of ways to make a certain value using a given set of coins.
Use dynamic programming to solve the coin change problem efficiently.
Create a 1D array to store the number of ways to make each value from 0 to the target value.
Iterate through the coins and update the array based on the current coin's value.
The final answer will be stored in the last element of the array.
Example: For target value 5 and coins [1, 2, 5], there are 4 w...read more
Q4. K rotation of a an array
Rotate an array by K positions to the right
Create a new array and copy elements from original array starting from index (n-k) to n-1, then copy elements from index 0 to (n-k-1)
Alternatively, reverse the entire array, then reverse the first k elements and the remaining n-k elements separately
Handle cases where k is greater than array length by taking modulo of k with array length
Q5. Implementation of LFU Cache
LFU (Least Frequently Used) cache is a data structure that removes the least frequently used items when the cache is full.
LFU cache stores key-value pairs with a frequency count to track usage.
When a new item is added, its frequency count is set to 1.
When an existing item is accessed, its frequency count is incremented.
When the cache is full, the item with the lowest frequency count is removed.
Example: If cache size is 3 and items are accessed in the order A, B, A, C, A, B, t...read more
Q6. To print all permutation of a string
Use recursion to generate all possible permutations of a given string.
Use recursion to swap characters in the string to generate permutations
Keep track of visited characters to avoid duplicates
Base case: when the length of the string is 1, add it to the result array
Q7. K DISTANCE NODES FROM CURRENT NODE
Finding nodes at a distance of K from the current node in a tree/graph.
Use BFS/DFS to traverse the tree/graph.
Maintain a visited set to avoid revisiting nodes.
Keep track of the distance of each node from the current node.
Return all nodes at a distance of K from the current node.
Q8. Write SQL query
SQL query to retrieve total sales amount by product category
Use GROUP BY clause to group the results by product category
Use SUM() function to calculate the total sales amount
Join the tables if necessary to get the required data
Q9. 1. Design a yin yang using css
Design a yin yang using css
Create a circle using border-radius property
Use background-color to fill the circle with black and white
Create two smaller circles inside the main circle using absolute positioning
Use transform property to rotate the smaller circles
Add box-shadow to create the 3D effect
Q10. LCA OF THE BINARY TREE
Find the lowest common ancestor of two nodes in a binary tree.
Traverse the tree recursively to find the paths from root to the two nodes.
Compare the paths to find the last common node.
If one of the nodes is the ancestor of the other, return the ancestor node.
If either of the nodes is not present in the tree, return null.
Interview Process at Cinépolis
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month