Filter interviews by
Sorting an array of 0, 1 and 2 can be done in O(n) using two pointers.
Use two pointers, one for 0 and one for 2, and a current pointer to traverse the array
If the current pointer encounters a 0, swap it with the 0 pointer and move both pointers to the right
If the current pointer encounters a 2, swap it with the 2 pointer and move the 2 pointer to the left
Repeat until the current pointer meets the 2 pointer
Algorithm to find if a number is present in a sorted n x n matrix with linear time complexity.
Start with the top right element
Compare the element with x
If equal, return its position
If e < x, move down (if out of bounds, return false)
If e > x, move left (if out of bounds, return false)
Repeat till element is found or returned false
The problem is to find non-empty subsets of a given set of integers whose sum is zero.
The problem is a special case of the knapsack problem and is known to be NP-Complete.
A brute-force approach would involve generating all subsets and checking their sums.
The brute-force approach has an exponential time complexity.
There is no known polynomial time solution for this problem.
Data structure with O(1) insert, delete, and find min without creating new structures
Use two stacks, one for actual data and one for minimum values
When inserting, push the value onto the data stack and push the minimum of the new value and the top of the minimum stack onto the minimum stack
When deleting, pop from both stacks
When finding the minimum, return the top of the minimum stack
The glasses are stacked like a pyramid on a table. Each glass can hold a certain amount of water, and the overflow is distributed equally to the glasses below.
The glasses form a pyramid shape, with the topmost glass being the first level and each subsequent level having one more glass than the previous level.
The amount of water held by each glass can be calculated by dividing the total amount of water by the number of ...
Divide a rectangle of M x N into smaller rectangles of M1 x N1 to minimize wastage.
Start by dividing the rectangle horizontally or vertically based on the dimensions of the smaller rectangles.
Continue dividing each resulting sub-rectangle until no further division is possible.
Consider the dimensions of the smaller rectangles and the remaining space to minimize wastage.
Keep track of the divisions made to reconstruct the
The number of 'BB' occurrences at the Nth iteration of the transformation sequence.
At each iteration, A gets transformed to AB and B gets transformed to BA.
To find the number of 'BB' occurrences at the Nth iteration, we need to count the number of 'BB' substrings in the transformed string.
The transformation sequence follows a pattern: AB, ABA, ABAAB, ABAABABA, ...
The number of 'BB' occurrences doubles with each iterati...
Top trending discussions
Data structure was more and it was difficult round
I was interviewed in Nov 2024.
Coding test was easy. They asked LC easy anyone with fair understanding of programming can easily solve it.
I applied via Great learning and was interviewed in Oct 2024. There were 2 interview rounds.
Coding question, reasoning, english, math, very easy
I am a software engineer with 5 years of experience in developing web applications using Java, Spring Boot, and Angular.
5 years of experience in software development
Proficient in Java, Spring Boot, and Angular
Strong problem-solving skills
Experience working in Agile development environment
Passionate about learning new technologies
posted on 13 Dec 2024
I applied via Cuvette and was interviewed in Nov 2024. There were 4 interview rounds.
Aptitude questions followed by two coding questions.
Two coding questions followed by a discussion on projects.
Three coding questions and inquiries related to Data Structures and Algorithms (DSA), Object-Oriented Programming (OOP), and project-related topics.
Solely 2 coding question
posted on 1 Jun 2024
I applied via Campus Placement
4 sections Quantitative Analysis, Programming Based (output analysis, error detection), Aptitude and ML Engineering ( activation functions, models etc basics)
Some of the top questions asked at the Directi Software Engineer interview -
based on 2 reviews
Rating in categories
Software Development Engineer II
13
salaries
| ₹21.5 L/yr - ₹55 L/yr |
Senior Software Engineer
11
salaries
| ₹25 L/yr - ₹57 L/yr |
Product Manager
11
salaries
| ₹21 L/yr - ₹35 L/yr |
Software Engineer
9
salaries
| ₹9.1 L/yr - ₹36.4 L/yr |
Software Developer
9
salaries
| ₹8.4 L/yr - ₹30 L/yr |
Zoho
TCS
Infosys
Wipro