Directi
Disha Classes Interview Questions and Answers
Q1. Duplicate Elements in Array
You are provided with an array or list called ARR
, consisting of N
integers. These integers fall within the range from 0 to N - 1. Some elements in this array may appear more than on...read more
Q2. Maximum Sum Subarray Problem Statement
Given an array of integers, find the maximum sum of any contiguous subarray within the array.
Example:
Input:
array = [34, -50, 42, 14, -5, 86]
Output:
137
Explanation:
Th...read more
Q3. Exclusive Time of Functions
We are executing a program containing 'N' functions on a single-threaded CPU. Each function has a unique 'ID' between 0 and (N-1). Each time a function starts or ends, a log is recor...read more
Q4. Dijkstra's Algorithm Problem Statement
Given an undirected graph with 'V' vertices (labeled 0, 1, ..., V-1) and 'E' edges, where each edge connects two nodes ('X', 'Y') and has a weight that denotes the distanc...read more
Q5. Occurrence of X in a Sorted Array Problem Statement
Given a sorted array of integers of size N and an integer X, determine the total number of occurrences of X in the array.
Input:
The first line of the input c...read more
Q6. Leaf Nodes Retrieval from Binary Tree
Given a binary tree, implement a function that returns a list of leaf nodes following their appearance from left to right. If leaf nodes are equidistant from the leftmost n...read more
Q7. Find Triplets with Given Sum Problem Statement
Given an array ARR
consisting of N
integers, your task is to identify all distinct triplets within the array that sum up to a given integer K
.
Explanation:
An arra...read more
Q8. Stock Buy and Sell Problem Statement
Given an array/list 'prices' where the elements represent yesterday's stock prices at each minute, determine the maximum profit possible from a single buy and sell action.
Y...read more
Q9. Box Stacking Problem Statement
Consider you are provided with 'n' different types of rectangular 3D boxes. For each type of box, you have three separate arrays: height
, width
, and length
that define the dimensi...read more
Interview Process at Disha Classes
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month