Filter interviews by
I applied via Company Website and was interviewed in Jun 2022. There were 2 interview rounds.
Dijkstra's algorithm will not work when there are negative edge weights in the graph.
Dijkstra's algorithm assumes that all edge weights are non-negative.
If there are negative edge weights, the algorithm may produce incorrect shortest paths.
In such cases, other algorithms like Bellman-Ford or Floyd-Warshall should be used.
For example, consider a graph with a negative weight cycle.
Sparse table is a data structure used to efficiently answer range queries on an array.
Sparse table is used to optimize range query operations on an array.
It precomputes and stores the answers to all possible range queries in a table.
The table is constructed using a divide-and-conquer approach.
Sparse table reduces the time complexity of range queries from O(n) to O(1).
It is commonly used in scenarios where range queries
Top trending discussions
Software Engineer
36
salaries
| ₹6 L/yr - ₹11.9 L/yr |
Software Development Engineer
32
salaries
| ₹7 L/yr - ₹14.8 L/yr |
Member Technical Staff
30
salaries
| ₹5 L/yr - ₹11 L/yr |
Technical Content Writer
28
salaries
| ₹1 L/yr - ₹6.2 L/yr |
Software Developer
27
salaries
| ₹5.2 L/yr - ₹14 L/yr |
CodeChef
HackerRank
upGrad
Simplilearn