Add office photos
Employer?
Claim Account for FREE

Josh Technology Group

3.0
based on 75 Reviews
Filter interviews by

NielsenIQ Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. 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

Ans.

Implement a function to generate Huffman codes for characters based on their frequencies in an alien language message.

  • Use a priority queue to build the Huffman tree efficiently.

  • Assign '0' and '1' to left and right branches of the tree respectively to generate unique binary codes.

  • Ensure that each code distinctly identifies its corresponding character and minimizes the total number of bits used for the message.

View 1 answer

Q2. Ways To Make Coin Change

Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more

Ans.

The task is to find the total number of ways to make change for a specified value using given denominations.

  • Create a dynamic programming table to store the number of ways to make change for each value up to the target value.

  • Iterate through each denomination and update the table accordingly based on the current denomination.

  • The final answer will be the value in the table at the target value.

  • Consider edge cases such as when the target value is 0 or when there are no denominatio...read more

Add your answer

Q3. Unique Element In Sorted Array

Nobita wants to impress Shizuka by correctly guessing her lucky number. Shizuka provides a sorted list where every number appears twice, except for her lucky number, which appears...read more

Ans.

Find the unique element in a sorted array where all other elements appear twice.

  • Iterate through the array and XOR all elements to find the unique element.

  • Use a hash set to keep track of elements and find the unique one.

  • Sort the array and check adjacent elements to find the unique one.

Add your answer

Q4. Find Nodes at Distance K in a Binary Tree

Your task is to find all nodes that are exactly a distance K from a given node in an arbitrary binary tree. The distance is defined as the number of edges between nodes...read more

Ans.

Find all nodes at distance K from a given node in a binary tree.

  • Perform a depth-first search starting from the target node to find nodes at distance K.

  • Use a recursive function to traverse the tree and keep track of the distance from the target node.

  • Maintain a set to store visited nodes and avoid revisiting them.

  • Return the list of nodes found at distance K from the target node.

  • Example: For the given input tree, target node 5, and K = 2, the output should be [7, 4, 0, 8].

Add your answer
Discover NielsenIQ interview dos and don'ts from real experiences

Q5. Remove BST Keys Outside Given Range

Given a Binary Search Tree (BST) and a specified range [min, max], your task is to remove all keys from the BST that fall outside this range. The BST should remain valid afte...read more

Ans.

Remove keys outside given range from a Binary Search Tree while keeping it valid.

  • Traverse the BST in inorder and remove nodes outside the specified range

  • Recursively check left and right subtrees for nodes to remove

  • Update pointers to maintain the validity of the BST

  • Return the inorder traversal of the adjusted BST

Add your answer

Q6. Inorder Successor in a Binary Tree

Given an arbitrary binary tree and a specific node within that tree, determine the inorder successor of this node.

Explanation:

The inorder successor of a node in a binary tre...read more

Ans.

Given a binary tree and a specific node, find its inorder successor in the tree.

  • Perform an inorder traversal of the binary tree to find the successor node.

  • If the given node has a right child, the successor is the leftmost node in the right subtree.

  • If the given node does not have a right child, backtrack to find the ancestor whose left child is the given node.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Intern Interview Questions from Similar Companies

3.8
 • 25 Interview Questions
3.8
 • 19 Interview Questions
3.8
 • 16 Interview Questions
3.8
 • 13 Interview Questions
4.2
 • 11 Interview Questions
4.4
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter