
Tower Research Capital LLC

10+ Tower Research Capital LLC Software Developer Interview Questions and Answers
Q1. Print Nodes at Distance K from a Given Node
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of these no...read more
Given a binary tree, a target node, and an integer K, find all nodes at distance K from the target node.
Traverse the binary tree to find the target node.
Use BFS to traverse the tree from the target node to nodes at distance K.
Keep track of the distance while traversing the tree.
Return the values of nodes at distance K in any order.
Q2. Unweighted Graph Shortest Path Problem
You are tasked with finding the shortest path between two houses in the city of Ninjaland, represented as an unweighted graph. The city has N
houses numbered from 1 to N
a...read more
Find the shortest path between two houses in a city represented as an unweighted graph.
Use breadth-first search (BFS) algorithm to find the shortest path in an unweighted graph.
Start BFS from the source house and keep track of the path taken to reach each house.
Once the destination house is reached, backtrack from destination to source to find the shortest path.
Consider using a queue data structure to implement BFS efficiently.
Handle cases where multiple shortest paths exist ...read more
Q3. Clearing the Forest Problem Statement
Ninja lives in a city called Byteland where a festive event is being organized. To make space for this event, Ninja is tasked with clearing a nearby forest. The forest is r...read more
Calculate the minimum number of steps Ninja needs to cut down all trees in a forest grid.
Iterate through the grid to find the shortest path to cut down all trees in order.
Use a priority queue to keep track of the shortest trees to cut next.
If it's impossible to cut all trees, return -1.
Consider all four cardinal directions for movement in the grid.
Q4. Palindromic Substrings Problem Statement
Given a string S
, your task is to return all distinct palindromic substrings of the given string in alphabetical order.
Explanation:
A string is considered a palindrome ...read more
Return all distinct palindromic substrings of a given string in alphabetical order.
Iterate through all possible substrings of the given string.
Check if each substring is a palindrome by comparing it with its reverse.
Store all palindromic substrings in a set to ensure uniqueness.
Return the sorted list of palindromic substrings.
Q5. Rearrange Array Numbers for Largest Possible Number
Given an array ARR
consisting of non-negative integers, rearrange the numbers to form the largest possible numerical value. You are not permitted to alter the...read more
Rearrange array numbers to form the largest possible numerical value by combining digits of each number in the array.
Convert integers in the array to strings for easier manipulation.
Sort the array of strings in non-increasing order based on custom comparison function.
Join the sorted strings to form the largest possible number.
Q6. Check If Two Nodes Are Cousins
You are given an arbitrary binary tree consisting of N nodes, where each node is associated with a certain value, and two node values, a
and b
. Your task is to determine if these ...read more
Check if two nodes in a binary tree are cousins by comparing their levels and parents.
Traverse the tree to find the levels and parents of the given nodes.
Compare the levels and parents of the two nodes to determine if they are cousins.
If the levels are the same and the parents are different, the nodes are cousins.
Q7. Counting Nodes in a Complete Binary Tree - Problem Statement
Given the root of a complete binary tree, calculate the total number of nodes in this tree.
A complete binary tree is defined as a binary tree in whi...read more
Count the total number of nodes in a complete binary tree given its root.
Traverse the tree in level order and count the nodes
Use a queue to keep track of nodes at each level
Check for null nodes represented by -1 in the input
The total number of nodes in the example tree is 7
Q8. Subarray Challenge: Largest Equal 0s and 1s
Determine the length of the largest subarray within a given array of 0s and 1s, such that the subarray contains an equal number of 0s and 1s.
Input:
Input begins with...read more
Find the length of the largest subarray with equal number of 0s and 1s in a given array.
Iterate through the array and maintain a count of 0s and 1s encountered so far.
Store the count difference in a hashmap with the index as the key.
If the same count difference is encountered again, the subarray between the two indices has equal 0s and 1s.
Return the length of the longest subarray found.
Q9. Island Perimeter Calculation Problem
Given a binary grid representation of a map of an island, calculate the perimeter of the island. The grid uses '0' for water and '1' for land.
The grid has only one island, ...read more
Calculate the perimeter of an island represented by a binary grid.
Iterate through the grid and count the perimeter based on land cells and their adjacent cells.
Each land cell contributes 4 units to the perimeter, subtract 2 units for each adjacent land cell.
Handle edge cases where land cells are at the boundaries of the grid.
Return the total perimeter for each test case.
ACID properties ensure database transactions are processed reliably. Rollback mechanism undoes changes if transaction fails.
ACID properties: Atomicity, Consistency, Isolation, Durability
Atomicity ensures all operations in a transaction are completed successfully or none at all
Consistency ensures database remains in a valid state before and after transaction
Isolation ensures transactions are independent and do not interfere with each other
Durability ensures changes made by com...read more
To find and correct a bug in code, analyze problem statement, review code, use debugging tools, and test different scenarios.
Understand the problem statement and expected output.
Review the code for syntax errors, logical errors, and potential bugs.
Use debugging tools like breakpoints, print statements, and IDE debuggers.
Test the code with different inputs to identify the bug.
Make necessary corrections based on the identified bug.
Re-test the code to ensure the bug is fixed.
Q12. Design MakeMyTrip kind of application.
MakeMyTrip is a travel booking application that allows users to book flights, hotels, and holiday packages.
Include features like flight/hotel search, booking, payment gateway integration, and user profiles.
Implement filters for search results, reviews/ratings for hotels, and notifications for booking updates.
Integrate maps for location tracking, weather forecasts, and customer support chatbot.
Offer discounts, loyalty programs, and referral bonuses to attract and retain custom...read more
More about working at Tower Research Capital LLC

Interview Process at Tower Research Capital LLC Software Developer

Top Software Developer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

