Google | Software Engineer | August 2021 [Reject]
Anonymous User
770

Round 1

Question : Given a list of strings and one string (str)to be search
Return all relevant strings of the string str in the order of relevancy.

And the question was left vague after the above statements
Asked outputs to various different test cases in order to get the clarity around relevant searches.
Example -

Input - List of strings : ['xyz', 'mno','a', 'qabc' 'uyabcdery', 'abc', 'abcd', 'bcde']
String to search : 'abc'

Output (All relevant strings to 'abc' in the following order) - ['abc', 'abcd', 'qabc', 'uyabcdery', 'bcde', 'a']

Comments (4)