Texas Instruments
Kotak Securities Interview Questions and Answers
Assume you initially have an empty array say ‘ARR’.
You need to return the updated array provided that some ‘Q’ number of queries were performed on this array.
The queries are of two types:
1. 1 ‘VAL’,...read more
The problem requires updating an array based on a series of queries, where each query can either insert a value or perform a bitwise XOR operation on all elements.
Use a loop to iterate through each query and update the array accordingly
For type 1 query, append the value to the end of the array
For type 2 query, perform a bitwise XOR operation on each element of the array with the given value
Return the updated array after processing all the queries
‘N’ people are standing in a circle numbered from ‘1’ to ‘N’ in clockwise order. First, the person numbered 1 will proceed in a clockwise direction and will skip K-1 persons including itself and will ki...read more
This question is about finding the position of the last person surviving in a circle of N people, where each person kills the Kth person in a clockwise direction.
Implement a function that takes the number of test cases, N, and K as input
For each test case, simulate the killing process by iterating through the circle and skipping K-1 people
Keep track of the position of the last person surviving and return it as the output
You have been given an array/list 'HEIGHTS' of length ‘N. 'HEIGHTS' represents the histogram and each element of 'HEIGHTS' represents the height of the histogram bar. Consider th...read more
The task is to find the largest rectangle possible in a given histogram and return its area.
Iterate through the histogram and maintain a stack to keep track of the indices of the bars in non-decreasing order of heights.
For each bar, calculate the area of the rectangle that can be formed using that bar as the smallest bar.
To calculate the area, pop the bars from the stack until a bar with a smaller height is encountered.
The width of the rectangle will be the difference between...read more
Stark Industry is planning to organize Stark Expo, for which various departments have to organize meetings to check their preparations. Since Stark Tower has limited rooms available for the meeting, ...read more
The task is to find the minimum number of conference rooms required to organize all the meetings.
Sort the meetings based on their start time.
Initialize a priority queue to store the end times of the meetings in ascending order.
Iterate through the sorted meetings and check if the start time of the current meeting is greater than the end time of the meeting at the top of the priority queue.
If it is, remove the meeting from the priority queue.
Add the end time of the current meet...read more
You are given an M X N matrix of integers ARR. Your task is to find the maximum sum rectangle.
Maximum sum rectangle is a rectangle with the maximum value for the sum of integers present wi...read more
The task is to find the maximum sum rectangle in a given matrix of integers.
Iterate through all possible rectangles in the matrix
Calculate the sum of each rectangle
Keep track of the maximum sum rectangle found so far
Return the maximum sum
You have been given a Snake and Ladder Board with 'N' rows and 'N' columns with the numbers written from 1 to (N*N) starting from the bottom left of the board, and alternating direction each row...read more
The question is about finding the minimum number of throws required to reach the last cell on a Snake and Ladder board.
The board is represented as a 2D matrix with N rows and N columns.
Each square on the board can have a snake or ladder, represented by a non-negative number.
The destination of a snake or ladder is the value at the corresponding square.
You can only take a snake or ladder once per move.
If the destination of a snake or ladder is the start of another snake or ladd...read more
Top Software Developer Intern Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month