Range Question

Правка en1, от gXa, 2019-12-12 11:43:05

A list of strings of lowercase English alphabets is given.

It is followed by a list of strings, where each operation is denoted by

(a, b, c): append character c to all elements in the range a to b

c can be of three types (#,$,%), and if c is already appended to an element, adding again won't affect.

We need to find minimum number of operations required actually to get the final output.

Note: All operations must be done in the given order. We can decide to skip it or not.

Given list of strings: a, b, c, d

Operations:

1. 1 2 $

2. 1 4 $

Output: 1 as 2 would bring the final output itself.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский gXa 2019-12-12 11:46:48 24
en1 Английский gXa 2019-12-12 11:43:05 652 Initial revision (published)