Filter interviews by
Find the maximum sum of a contiguous subarray using dynamic programming.
Use Kadane's algorithm for an efficient O(n) solution.
Initialize two variables: max_so_far and max_ending_here.
Iterate through the array, updating max_ending_here with the maximum of current element or current element + max_ending_here.
Update max_so_far to be the maximum of itself and max_ending_here.
Example: For array [-2,1,-3,4,-1,2,1,-5,4],...
Clone a graph by creating a deep copy of its nodes and edges.
Use Depth-First Search (DFS) or Breadth-First Search (BFS) for traversal.
Maintain a mapping of original nodes to their clones.
For each node, create a clone and connect it to its cloned neighbors.
Example: For a node with neighbors [2, 3], clone it and connect to clones of 2 and 3.
Sum queries on a 2D matrix
Iterate through each query and calculate the sum of elements in the given range
Use prefix sum technique to optimize the solution
Preprocess the matrix to store the sum of elements in each row and column for faster calculation
Height of a binary tree is the maximum number of edges from the root node to any leaf node.
The height of an empty tree is 0.
The height of a tree with only one node is 1.
The height of a tree can be calculated recursively by finding the height of its left and right subtrees and adding 1 to the maximum of the two heights.
The time complexity of finding the height of a binary tree is O(n), where n is the number of node...
Reverse a linked list
Iterate through the linked list and change the direction of the pointers
Use three pointers to keep track of the current, previous, and next nodes
Make sure to update the head and tail pointers accordingly
Swap 2 numbers without using a third variable
Use the XOR operation to swap the numbers
Assign the first number to the second number using XOR
Assign the second number to the first number using XOR
I applied via Naukri.com and was interviewed in Jun 2022. There were 4 interview rounds.
Find the maximum sum of a contiguous subarray using dynamic programming.
Use Kadane's algorithm for an efficient O(n) solution.
Initialize two variables: max_so_far and max_ending_here.
Iterate through the array, updating max_ending_here with the maximum of current element or current element + max_ending_here.
Update max_so_far to be the maximum of itself and max_ending_here.
Example: For array [-2,1,-3,4,-1,2,1,-5,4], max ...
Clone a graph by creating a deep copy of its nodes and edges.
Use Depth-First Search (DFS) or Breadth-First Search (BFS) for traversal.
Maintain a mapping of original nodes to their clones.
For each node, create a clone and connect it to its cloned neighbors.
Example: For a node with neighbors [2, 3], clone it and connect to clones of 2 and 3.
I applied via Hackerearth contest and was interviewed in Oct 2021. There was 1 interview round.
Reverse a linked list
Iterate through the linked list and change the direction of the pointers
Use three pointers to keep track of the current, previous, and next nodes
Make sure to update the head and tail pointers accordingly
Swap 2 numbers without using a third variable
Use the XOR operation to swap the numbers
Assign the first number to the second number using XOR
Assign the second number to the first number using XOR
Height of a binary tree is the maximum number of edges from the root node to any leaf node.
The height of an empty tree is 0.
The height of a tree with only one node is 1.
The height of a tree can be calculated recursively by finding the height of its left and right subtrees and adding 1 to the maximum of the two heights.
The time complexity of finding the height of a binary tree is O(n), where n is the number of nodes in ...
Sum queries on a 2D matrix
Iterate through each query and calculate the sum of elements in the given range
Use prefix sum technique to optimize the solution
Preprocess the matrix to store the sum of elements in each row and column for faster calculation
I applied via LinkedIn and was interviewed before Sep 2021. There were 2 interview rounds.
Easy tree questions from basic DSA sheets
Top trending discussions
I applied via Walk-in and was interviewed before Aug 2020. There was 1 interview round.
I applied via Naukri.com and was interviewed in May 2019. There were 3 interview rounds.
I appeared for an interview in Aug 2016.
The ISO/OSI model is a conceptual framework that standardizes the functions of a communication system into seven layers.
The ISO/OSI model stands for International Organization for Standardization/Open Systems Interconnection model.
It is a layered model that helps in understanding and designing network protocols.
The seven layers are: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Each la...
To lock a file in Linux, use the flock command or the fcntl system call.
The flock command can be used to lock a file by acquiring an exclusive or shared lock.
The fcntl system call can be used to lock a file by setting the F_SETLK or F_SETLKW command.
Locking a file prevents other processes from modifying or accessing it until the lock is released.
Locking can be done at the file level or at specific regions within a file...
CSS stands for Cascading Style Sheets. It is used to style the appearance of HTML elements on a webpage.
CSS helps in separating the content of a webpage from its design, making it easier to maintain and update.
It allows for consistent styling across multiple pages of a website.
CSS can be used to control layout, colors, fonts, and other visual aspects of a webpage.
It enables responsive design, making websites adapt to d...
To find a loop in a linked list, we can use the Floyd's cycle-finding algorithm.
Use two pointers, one moving at a speed of one node at a time and the other at a speed of two nodes at a time.
If there is a loop, the two pointers will eventually meet at the same node.
To find the starting point of the loop, move one pointer back to the head and then move both pointers at a speed of one node at a time.
The point where they m...
In 10 years, the software industry will be driven by AI, automation, and a focus on security and sustainability in development.
AI Integration: Software will increasingly leverage AI for tasks like code generation, testing, and bug fixing, enhancing developer productivity.
Low-Code/No-Code Platforms: These platforms will democratize software development, allowing non-developers to create applications with minimal coding.
...
I appeared for an interview before Jun 2016.
Yesterday was a productive day filled with meetings and project work.
Attended a team meeting in the morning
Worked on a project proposal in the afternoon
Had a networking event in the evening
The letters on a keyboard are placed in a specific layout called QWERTY, which was designed to prevent typewriter jams.
The QWERTY layout was developed by Christopher Sholes in 1873 for typewriters.
The layout was designed to separate commonly used letters to reduce the likelihood of jamming.
The arrangement of letters was based on the frequency of their use in the English language.
The QWERTY layout became popular and was...
An air conditioner is a device that cools and dehumidifies the air in a room or building.
Air conditioners work by removing heat and moisture from the air.
They use a refrigeration cycle to cool the air.
Air conditioners can be used for both residential and commercial purposes.
They come in different types such as window units, split systems, and central air conditioning systems.
Air conditioners improve indoor air quality ...
I applied via Walk-in and was interviewed before Dec 2019. There were 4 interview rounds.
based on 2 reviews
Rating in categories
Software Engineer
1.7k
salaries
| ₹12 L/yr - ₹22 L/yr |
Lead Engineer
687
salaries
| ₹18.9 L/yr - ₹35.1 L/yr |
Senior Software Engineer
606
salaries
| ₹16 L/yr - ₹25 L/yr |
Chief Engineer
409
salaries
| ₹26.9 L/yr - ₹50 L/yr |
Engineer
344
salaries
| ₹10.9 L/yr - ₹20.2 L/yr |
vivo
OPPO
LG Electronics
Bajaj Electricals