Google Screening Round
I got Google Screening round on 27/03/2024
Question 1:-
we have given a grid of size N*M having characters "#", "" and any english lower alphabet.
"#" :- Filled
"" :- Empty
Any english alphabet letter
we are also given an string word.
we have to find if we can fit this word in grid either directly mathcing with english alphbet or using the empty space( by filing with matching characters)
word should match exactly and any empty space should not be left before and after.
we can have word match from left to right and top to bottom only.
Example :-
#### ####
L_# ALA_# ALA does not fit as we have one space left at the end
#X#__ #X#__
#### ####
L_# ALAN# ALAN fits
#X#__ #X#__
I able to come up with one solution where i will iterat through all the grid cell and check if i have any matching char wiht start char or empty string to look for match
Time:- O(N*M +(N+M)*W)
N: Row sie
M: Col size
W:- word Size
Interviewer was satisfied with solution and asked me to code the solution while coding i missed some minor things which i able to correct while dry runn
What are tha chances i will be selected for onsite Intervierw ?


