Google phone interview question
Anonymous User
591

A warehouse manager trying to locate a faulty server that does not reply to queries. if server does not reply to a query the response is indicated by "N". if the server gives a late reply it is indicated by "L". Indicated by "O" if the response is on time.

A server is said to be faulty if it has three consective late replies (L) or More than one no replies (N). write a function that takes string (string of resposes) and retuns if the server is faulty.

example:
OONL is not a faulty server reponse string.

OLLL or NLON are faulty server response strings

Edit 1:

Follow up:

Return all the possible faulty response strings for with response length 4

Comments (4)