资 源 简 介
Programming Logic Test
Using any common programming language, program a
quick and straightforward answer to the following question (e.g. C++). A
regular expression or other pattern matching package should not be used.
Presented with a character stream that is infinite, output a "D" if the
sequence "ddd" is located, precisely. Alternatively, if the characters "ded"
are located, output an "E". You should not output both a "D" and an "E" for
the same data when processed.
For example:
1. The following stream of characters ddededddeddd would output: EDD
2. The following stream of characters dddededdddeedede would output: DEDE
@author Gaurav Pandey
Programming Logic:
Queue (FIFO) is used to manage the sliding window which is of length 3 and
wo