Tip 1 : Learn new topics regular and revised that topic .
Tip 2 : Apply practically.
Tip 3 : Do a project
Tip 1 : Technology you know, projects
Tip 2 : No false information
It was in the evening.
A diagonal traversal Consider lines of slope -1 passing between nodes.
1
/ \
4 2
/ \ \
8 5 3
/ \ /
9 7 6
Example: Here potential diagonals are:
1 -- 2 -- 3
4 -- 5 -- 7 -- 6
8 -- 9 -- 7
Input:
5
/ \
6 5
\ \
6 5
Output: 2
Explanation:
Diagonal 6 – 6 and 5 – 5 contains equal value. Therefore, the required output is 2.
It was in the night.
As this value might be large, print it modulo 10^9 + 7
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which operator is used for exponentiation in Python?