Add office photos
Employer?
Claim Account for FREE

Texas Instruments

4.1
based on 173 Reviews
Filter interviews by

Kotak Securities Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations
Q1. XOR Query

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

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

View 3 more answers
Q2. Josephus

‘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

Ans.

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

View 2 more answers
Q3. Largest rectangle in a histogram

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

Ans.

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

View 4 more answers
Q4. Meetings II

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

Ans.

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

View 3 more answers
Discover Kotak Securities interview dos and don'ts from real experiences
Q5. Maximum sum rectangle

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

Ans.

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

View 2 more answers
Q6. Snake and Ladder

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

Ans.

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

View 1 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 Software Developer Intern Interview Questions from Similar Companies

3.6
 • 59 Interview Questions
4.2
 • 20 Interview Questions
3.3
 • 16 Interview Questions
3.8
 • 15 Interview Questions
3.7
 • 12 Interview Questions
3.8
 • 10 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
Get AmbitionBox app

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