Wrong Answer for SPOJ PHONELST

After inserting into the vector all the phone numbers, the vector needs to be sorted. The reason is that if insertion is done without sorting the array, for the test case below the code gives wrong answer.

2
91190
911
The judge accepts the solution after the change mentioned above is made.

Leave a Comment