Snapdeal
10+ Jio Interview Questions and Answers
You are given an Integer array ‘ARR’ and an Integer ‘K’. Your task is to find the ‘K’ most frequent elements in ‘ARR’. Return the elements sorted in ascending or...read more
You're given string ‘STR’ consisting solely of “{“, “}”, “(“, “)”, “[“ and “]” . Determine whether the parentheses are balanced.
Input Format:
The first line cont...read more
Given a binary tree having a positive integer written on each of its nodes. Your task is to find the vertical sum of node values i.e. the sum of nodes that can be connected by...read more
You are given an arbitrary binary tree consisting of N nodes, where each node is associated with a certain value, your task is to find the maximum sum for a level in the tre...read more
You are given a string S which represents a number. You have to find the smallest number strictly greater than the given number which contains the same set of dig...read more
Q6. calculate the top 10 words , which comes frequently in 1 hour time span , on facebook, (dynamically)
Calculate top 10 frequently used words on Facebook in 1 hour dynamically.
Use Facebook API to fetch data
Implement a script to count word frequency
Sort the words based on frequency and return top 10
Q8. Calculate the level sum of the binary tree
Calculate the level sum of a binary tree.
Traverse the tree level by level using BFS
Add the values of nodes at each level
Store the level sum in an array
Return the array of level sums
Q9. Number of rectangles/squares in chess board
There are 204 squares and 1296 rectangles on a standard 8x8 chess board.
The number of squares can be calculated using the formula n(n+1)(2n+1)/6, where n is the number of rows/columns.
The number of rectangles can be calculated using the formula n(n+1)m(m+1)/4, where n and m are the number of rows and columns respectively.
For an 8x8 chess board, there are 64 squares of size 1x1, 49 squares of size 2x2, 36 squares of size 3x3, 25 squares of size 4x4, 16 squares of size 5x5, 9 s...read more
Q10. Vertical sum of binary tree
Vertical sum of binary tree is the sum of all nodes in each vertical line of the tree.
Traverse the tree in-order and keep track of the horizontal distance of each node from the root.
Use a hash table to store the sum of nodes at each horizontal distance.
Recursively traverse the left and right subtrees and update the hash table accordingly.
Q11. defective ball puzzle problem
Defective ball puzzle involves finding the odd ball out of a group of identical balls using a balance scale.
Divide the balls into groups and weigh them on the balance scale.
If the scale tips, the odd ball is in the heavier group.
If the scale doesn't tip, the odd ball is in the remaining group.
Repeat the process until the odd ball is found.
Example: 8 identical balls, one is heavier. Divide into groups of 3 and weigh. If the scale tips, weigh two of the three balls to find the ...read more
Q12. Find the pair element from the array
Find the pair element from the array
Iterate through the array and use a hashmap to store elements and their counts
Check if the current element's complement exists in the hashmap
Return the pair if found, otherwise return null
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month