Tip 1 : practice variety of questions and cover all the data structures and major algorithms
Tip 2 : Be clear fundamentals of computer science concepts.
Tip 1 : Keep it one page and mention only important points
Tip 2 : Include internship experience or project work



1. Include the source node as a destination also.
2. There are no cycles in the given graph.



A section is considered painted if at least one painter paints it.



-1 -> It denotes a wall or an obstacle
0 -> It denotes a gate
2^31 - 1 = 2147483647 ( INF ) -> An infinitely large value denotes the empty room.
For each empty room (denoted by INF), you have to refill it with the distance to its nearest gate. If none of the gates is reachable from an empty room then the value ‘INF’ will remain as it is.
For the matrix [[0,-1],[0,2147483647]] the updated matrix will be [[0,-1],[0,1]].
The distance between two cells having their coordinates (x1,y1) and (x2,y2) are abs(x2-x1) + abs(y2-y1).



You can use any string of A multiple times.
A =[“coding”, ”ninjas”, “is”, “awesome”] target = “codingninjas”
Ans = true as we use “coding” and “ninjas” to form “codingninjas”



Input: ‘asteroids’ = [3,-2,4]
Output: [3, 4]
Explanation: The first asteroid will destroy the second asteroid. Hence, after the collision, the state of the asteroids will be [3,4].
You don’t need to print anything. Just implement the given function.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?