Google OA 2024 - first subsequence question
Anonymous User
881
Jul 13, 2024
Jul 13, 2024
write a program to check whether string A contains string B as a subsequence or not. you can change at most 1 character in string B except the first character
return the starting index of subsequence if found
else return -1
Ex -
-
A = abcbc
B = cbe
answer = 3 (1 based indexing) -
A = lhs
B = rhs
answer = -1 (you cannot change first character of B)
Comments (7)


