Tip 1 : Prepare maximum algorithms.
Tip 2 : Deep knowledge of data structure.
Tip 3 : OOPS is must.
Tip 1 : Keep it short.
Tip 2 : Mention only your own projects.
Timing was 9:15AM. Platform was not very good. Questions were not well explained.
for the given 5 intervals - [1,4], [3,5], [6,8], [10,12], [8,9].
Since intervals [1,4] and [3,5] overlap with each other, we will merge them into a single interval as [1,5].
Similarly [6,8] and [8,9] overlaps, we merge them into [6,9].
Interval [10,12] does not overlap with any interval.
Final List after merging overlapping intervals: [1,5], [6,9], [10,12]
Here, sorted paths mean that the expected output should be in alphabetical order.
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1
Expected Output:
DDRDRR DRDDRR
i.e. Path-1: DDRDRR and Path-2: DRDDRR
The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What does HTML stand for?