
Tower Research Capital LLC

Tower Research Capital LLC SDE-2 Interview Questions and Answers
Q1. Minimum Cost to Reduce Array
Given an array ARR
of size N
containing positive integers, the task is to reduce the size of the array to 1 by performing a specific operation multiple times. In one operation, you ...read more
Find the minimum cost to reduce an array to one element by merging adjacent elements.
Iterate through the array and merge adjacent elements with the smallest sum each time.
Keep track of the total cost as you merge elements.
Repeat the merging process until only one element remains in the array.
Q2. Word Ladder Problem Statement
Given two strings, BEGIN
and END
, along with an array of strings DICT
, determine the length of the shortest transformation sequence from BEGIN
to END
. Each transformation involves ...read more
The Word Ladder problem involves finding the shortest transformation sequence from one word to another by changing one letter at a time.
Use breadth-first search to find the shortest transformation sequence.
Create a graph where each word is a node and edges connect words that differ by one letter.
Keep track of visited words to avoid revisiting them.
Return -1 if no transformation sequence is possible.
Q3. Number of Islands Problem Statement
You are provided with a 2-dimensional matrix having N
rows and M
columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in this ma...read more
Count the number of islands in a 2D matrix of 1s and 0s.
Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the matrix and identify connected groups of 1s.
Maintain a visited array to keep track of visited cells to avoid redundant traversal.
Increment the island count whenever a new island is encountered.
Consider all eight possible directions for connectivity between cells.
Handle edge cases like out of bounds indices and already visited cells.
Q4. Rotting Oranges Problem Statement
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
- 0 - representing an empty cell
- 1 - representing a fresh orange...read more
Find the minimum time required to rot all fresh oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process
Track the time taken to rot all oranges and return it
If any fresh oranges remain after simulation, return -1
Handle edge cases like empty grid or no fresh oranges
Output the person with the maximum earnings from each department
Join the employee and department tables on department ID
Group by department ID and find the max earnings for each department
Join the result with the employee table to get the person with max earnings
Splitwise is a system for managing shared expenses among groups of people.
1. Allow users to create groups and add members to track shared expenses.
2. Implement features for adding expenses, specifying who paid and who owes.
3. Calculate balances for each member and settle debts efficiently.
4. Provide notifications and reminders for pending payments.
5. Ensure security and privacy of user data.
6. Implement features like expense categorization, comments, and attachments.
7. Allow ...read more
More about working at Tower Research Capital LLC


Top SDE-2 Interview Questions from Similar Companies







Reviews
Interviews
Salaries
Users/Month

