Company: serion lab_5oct
Difficulty: medium
Sequential Message Decoder Problem Description Text is sent through a network channel one character at a time. Every character travels together with its index_number , the position it occupies in the text. Because of network latency and routing, the characters arrive out of order . You receive N pairs index_number character and place each character at its index the moment it arrives. A complete message occupies a range of positions l .. r and satisfies all of the following: the content is not empty, so l <= r ; every position from l to r inclusive has already received a lowercase letter (inferred -- the source does not say whether a * may appear inside the content; a * is treated as a separator, so the content consists of letters only.) ; position l - 1 and position r + 1 have both already received the character * . The content of the message is the string formed by the characters at positions l, l + 1, ..., r , read in increasing order of position , which need not be the order in w