Filter interviews by
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 reconstruc...
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 numbe...
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 it...
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.
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
Find the kth maximum element in a matrix by analyzing its elements efficiently.
1. Flatten the matrix into a single array for easier manipulation.
2. Sort the array in descending order to easily access the kth maximum element.
3. Use a min-heap of size k to keep track of the top k elements efficiently.
4. Example: For a matrix [[1, 5, 3], [4, 2, 6]], the 2nd max is 5.
5. Edge case: If k is larger than the number of uni...
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
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
Find the kth maximum element in a matrix by analyzing its elements efficiently.
1. Flatten the matrix into a single array for easier manipulation.
2. Sort the array in descending order to easily access the kth maximum element.
3. Use a min-heap of size k to keep track of the top k elements efficiently.
4. Example: For a matrix [[1, 5, 3], [4, 2, 6]], the 2nd max is 5.
5. Edge case: If k is larger than the number of unique e...
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
posted on 14 Mar 2015
Java is an object-oriented language while C is a procedural language.
Java is platform-independent while C is platform-dependent.
Java has automatic garbage collection while C requires manual memory management.
Java has built-in support for multithreading while C requires external libraries.
Java has a larger standard library compared to C.
Java is more secure than C due to its strong type checking and exception handling.
C ...
Aggregation functions are used to perform calculations on groups of data in a database.
Aggregation functions include COUNT, SUM, AVG, MAX, and MIN.
They are used with the GROUP BY clause to group data based on a specific column.
COUNT function returns the number of rows in a table or the number of non-null values in a column.
SUM function returns the sum of values in a column.
AVG function returns the average of values in ...
Two ways to write a sentence in mirror image form in Java: reverse string function and array conversion.
Use the reverse() method of the String class to reverse the sentence
Convert the sentence to a character array, then swap the first and last characters, second and second-to-last characters, and so on until the middle is reached
Example: 'Hello World' becomes 'dlroW olleH'
Static is used in public static void main to allow the method to be called without creating an instance of the class.
Static methods belong to the class and not to any instance of the class.
The main method is the entry point of a Java program and needs to be called without creating an object of the class.
The static keyword allows the main method to be called directly from the class, without creating an instance of the c...
Abstract classes, interfaces, and enums provide abstraction and modularity in Java.
Abstract classes provide a partial implementation of a class and cannot be instantiated.
Interfaces define a set of methods that a class must implement and can be used for multiple inheritance.
Enums provide a set of named constants.
All three are used for abstraction and modularity in Java.
Abstract classes and interfaces are used for polym...
Object-oriented software engineering is a framework for designing and developing software using objects.
Object-oriented software engineering is a methodology for designing and developing software using objects.
It involves creating classes and objects that encapsulate data and behavior.
Frameworks are pre-built structures that provide a foundation for building software applications.
Frameworks can include libraries, APIs,...
Java is an object-oriented language with features like inheritance, encapsulation, and polymorphism.
Inheritance allows classes to inherit properties and methods from other classes.
Encapsulation hides the implementation details of a class from other classes.
Polymorphism allows objects to take on multiple forms or behaviors.
Java also supports abstraction, interfaces, and exception handling.
Example: class Car extends Vehi...
Normalization is a process of organizing data in a database to reduce redundancy and dependency.
Normalization is used to eliminate data redundancy and improve data integrity.
It involves dividing a database into two or more tables and defining relationships between them.
There are different levels of normalization, such as first normal form (1NF), second normal form (2NF), and so on.
Normalization helps in efficient data ...
ADBMS stands for Advanced Database Management System which is an extension of DBMS with additional features.
ADBMS has advanced features like data mining, data warehousing, and online analytical processing.
ADBMS is used for handling large and complex data sets.
DBMS is a basic system for managing data and is used for small and simple data sets.
DBMS does not have advanced features like ADBMS.
Examples of ADBMS are Oracle, ...
I am a software engineer with 5 years of experience in developing web applications.
Proficient in programming languages such as Java, Python, and JavaScript
Experience in developing RESTful APIs and microservices
Familiarity with front-end technologies such as HTML, CSS, and React
Strong understanding of database management systems like MySQL and MongoDB
Experience in Agile development methodologies
I want to gain practical experience and contribute to the industry while also learning on the job.
I believe that hands-on experience is invaluable in the software engineering field
I am eager to apply my skills and knowledge to real-world projects
I am excited to work with a team and learn from experienced professionals
I am not currently pursuing post-graduation as I feel that gaining industry experience is more importan...
I would leverage my Java skills to quickly learn .NET and demonstrate my adaptability and problem-solving abilities.
Identify transferable skills: Both Java and .NET share object-oriented principles, making it easier to adapt.
Engage in self-study: Utilize online resources like Microsoft Learn or Pluralsight to gain .NET knowledge.
Build a small project: Create a simple application using .NET to showcase my ability to lea...
I appeared for an interview in Sep 2017.
I applied via Naukri.com and was interviewed before May 2018. There were 5 interview rounds.
I appeared for an interview in Sep 2019.
I applied via Recruitment Consultant and was interviewed before Jan 2020. There were 5 interview rounds.
I am proficient in Java, Python, and C++. I have 2 years of experience in software development. I have excellent communication skills for client interaction.
Proficient in Java, Python, and C++
2 years of software development experience
Excellent communication skills for client interaction
posted on 15 Jul 2022
I applied via Approached by Company and was interviewed before Jul 2021. There were 2 interview rounds.
Basic programming questions
I applied via Naukri.com and was interviewed before Apr 2021. There was 1 interview round.
I applied via Naukri.com and was interviewed before Sep 2020. There were 4 interview rounds.
Some of the top questions asked at the Directi Software Engineer interview -
based on 2 reviews
Rating in categories
Softwaretest Engineer
15
salaries
| ₹11.7 L/yr - ₹21.8 L/yr |
Software Developer
15
salaries
| ₹17 L/yr - ₹30 L/yr |
Senior Software Engineer
13
salaries
| ₹30.5 L/yr - ₹56.2 L/yr |
Product Manager
13
salaries
| ₹24 L/yr - ₹42.6 L/yr |
Software Development Engineer II
13
salaries
| ₹29.8 L/yr - ₹49.5 L/yr |
ITC Infotech
CMS IT Services
KocharTech
Xoriant