Tip 1 : Prepare OS, DBMS and OOPs also
Tip 2 : Do Competitive Coding Contest from CodeForces.
Tip 3 : Do leetcode 2 months before interviews.
Tip 1 : Have some good coding profiles on various platforms
Tip 2 : Mention some projects or past experience relevant to your stream
The round was taken on Cocubes platform with video enabled . The time I chose was 3:00 P.M.
The coding problems were medium and it was held online on Cocubes at 4:00 PM
All the possible root to leaf paths are:
3, 4, -2, 4 with sum 9
5, 3, 4 with sum 12
6, 3, 4 with sum 13
Here, the maximum sum is 13. Thus, the output path will be 6, 3, 4.
There will be only 1 path with max sum.
I applied DFS with memorization and it was optimized approach with O(n) time complexity.
If edges[i][j] = 1, that implies there is a bi-directional edge between ‘i’ and ‘j’, that means there exists both edges from ‘i’ to ‘j’ and to ‘j’ to ‘i’.
Given:
‘N’ = 3
‘edges’ = [[0, 1, 1], [0, 0, 1], [0,0,0]].
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you create a function in JavaScript?