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
0
Answer:
sorry really not into this!!
Similar questions
Social Sciences,
1 month ago
Political Science,
1 month ago
Math,
1 month ago
Social Sciences,
2 months ago
English,
9 months ago
English,
9 months ago