Tip 1: Give contests on coding platforms.
Tip 2: Practice DSA from a reliable source.
Tip 3: Know your projects thoroughly.
Tip 1: Have at least two worthwhile projects.
Tip 2: Highlight your achievements.
It was an offline coding round where we were required to bring our laptops to the test site and were under invigilation throughout the test.



Input: 'n' = 3, 'm' = 4
'queries' = [[1, 1], [1, 2], [2, 3]]
Output: [1, 1, 2]
Explanation:
Initially, the grid was:
0 0 0 0
0 0 0 0
0 0 0 0
After query (1, 1):
0 0 0 0
0 1 0 0
0 0 0 0
There is one island having land (1, 1).
After query (1, 2):
0 0 0 0
0 1 1 0
0 0 0 0
Since (1, 1) and (1, 2) share a common edge, they form one island. So there is one island having lands (1, 1) and (1, 2).
After query (2, 3):
0 0 0 0
0 1 1 0
0 0 0 1
Now there are two islands, one having lands (1, 1) and (1, 2), and another having land (2, 3).
So the number of islands after each query is [1, 1, 2].
I solved it using standard BFS.



1. You can only move one disk in one move.
2. You can not place a larger disk on top of a smaller disk.
3. You can only move the disk at the top of any rod.
You may assume that initially, the size of the ‘i’th disk from the top of the stack is equal to ‘i’, i.e. the disk at the bottom has size ‘N’, the disk above that has size ‘N - 1’, and so on. The disk at the top has size 1.

I built a recurrence relation and then used DP, which is very similar to the counting towers approach.
It was an online video call where I had to share my screen and solve a DSA problem while explaining my steps to the interviewer.



The same letter cell should not be used more than once.
For a given word “design” and the given 2D board
[[q’, ‘v’, ‘m’, ‘h’],
[‘d’, ‘e’, ‘s’, ‘i’],
[‘d’, ‘g’, ‘f’, ‘g’],
[‘e’, ‘c’, ‘p’, ‘n’]]
The word design can be formed by sequentially adjacent cells as shown by the highlighted color in the 2nd row and last column.

I used the standard backtracking approach while maintaining a visited grid for all positions. I also tried using an approach similar to BFS.
Couldn't make it till this stage.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the output of print(type("Python"))?