i
Thomson Reuters
Filter interviews by
Clear (1)
I applied via AmbitionBox and was interviewed in Jun 2024. There was 1 interview round.
Top trending discussions
Find an odd occurring number among even occurring numbers.
Use XOR operation to cancel out even occurring numbers and get the odd occurring number.
Iterate through the array and XOR each element with the result variable.
The final result will be the odd occurring number.
Print the spiral order of a binary tree and matrix.
For binary tree, use level order traversal and alternate direction for each level.
For matrix, use four pointers to traverse in spiral order.
Example for binary tree: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9
Example for matrix: 1 2 3 4 -> 8 7 6 5 -> 9 10 11 12 -> 16 15 14 13
Finding pairs in an array with a given sum.
Iterate through the array and for each element, check if the difference between the given sum and the element exists in the array.
Use a hash table to store the elements of the array and their indices for faster lookup.
If there are multiple pairs with the same sum, return any one of them.
If no pair is found, return null or an empty array.
Find total number of k element with given avg in an array in minimum time complexity.
Use sliding window technique to traverse the array in O(n) time complexity.
Maintain a sum variable to keep track of the sum of elements in the window.
If the sum of elements in the window is equal to k times the given avg, increment the count.
Move the window by subtracting the first element and adding the next element in the array.
Printing non-boundary elements of a binary tree
Traverse the tree in any order (preorder, inorder, postorder)
Check if the current node is not a boundary node (not the first or last node in its level)
If it is not a boundary node, print its value
Recursively traverse its left and right subtrees
I was interviewed before May 2016.
I applied via Referral and was interviewed in Sep 2023. There was 1 interview round.
Data Structures and Algorithms
Data Structures and Algorithms
A generic swap function swaps two values of any data type.
The function should take two parameters of any data type.
Use a temporary variable to store the value of one parameter.
Assign the value of the second parameter to the first parameter.
Assign the value of the temporary variable to the second parameter.
Search for an element in a rotated sorted linked list.
Find the pivot point where the list is rotated.
Divide the list into two sublists based on the pivot point.
Perform binary search on the appropriate sublist.
Handle edge cases such as empty list and list with only one element.
Search an element in a rotated sorted array
Find the pivot point where the array is rotated
Divide the array into two sub-arrays based on pivot point
Perform binary search on the appropriate sub-array
Repeat until element is found or sub-array size is 1
Find 5 missing numbers in an array of size 95 containing numbers in range 1 to 100.
Create a boolean array of size 100 and mark the present numbers
Iterate through the boolean array and find the missing numbers
Alternatively, use a HashSet to store the present numbers and find the missing ones
Given a Sudoku board, find possible numbers for an empty cell.
Iterate through empty cells and check possible numbers using row, column, and box constraints.
Use a set to keep track of possible numbers for each empty cell.
Return the set of possible numbers for the given empty cell.
Find integer average of 4 unsigned integers without typecasting
Add all the integers and divide by 4
Use bit shifting to divide by 4
Handle overflow by using long long data type
Use unsigned int data type for input
Code to identify 32 bit or 64 bit architecture of a processor
Check if the operating system is 32 bit or 64 bit
If OS is 32 bit, processor is 32 bit
If OS is 64 bit, check if processor supports 64 bit architecture
Use CPUID instruction to check if processor supports 64 bit architecture
Convert binary number to base 64 integer
Divide the binary number into groups of 6 bits
Convert each group of 6 bits to decimal
Map the decimal value to the corresponding base 64 character
Concatenate the base 64 characters to form the final integer
based on 1 interview
Interview experience
based on 19 reviews
Rating in categories
Software Engineer
509
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
459
salaries
| ₹0 L/yr - ₹0 L/yr |
Content Specialist
202
salaries
| ₹0 L/yr - ₹0 L/yr |
Content Analyst
173
salaries
| ₹0 L/yr - ₹0 L/yr |
Devops Engineer
144
salaries
| ₹0 L/yr - ₹0 L/yr |
Bloomberg
S&P Global
FactSet
Morningstar