Computer Science, asked by mahe8222, 2 months ago

Before the prayer assembly begins, the
students of different classes stand randomly in
a single line. Often they become noisy. To
maintain silence during the prayer assembly,
the teacher tells them to stand in a particular
sequence. The sequence is such that there are
at least N students of other classes standing
between students of the same class.
La ca N A WNA
Write an algorithm to output the final
sequence in which the students will stand. If no
such sequence is possible then output -1. If
more than one sequence is possible, then
output the lexicographically smallest string.

Answers

Answered by nimishatripathi
0

Answer:

sorry really not into this!!

Similar questions