Can someone explain how to do this Soldier and cards according to the method given in editorial . I have done this question using deque but I want a approach as followed in editorial.
Any help is much appreciated.
Can someone explain how to do this Soldier and cards according to the method given in editorial . I have done this question using deque but I want a approach as followed in editorial.
Any help is much appreciated.