Phone List Kattis Solution in Python 3
If you want to look at the question of phone list on kattis click on this Kattis Phone List.
How did I solve it?
The solution demand whether the given phone number occurs in the prefix of the given phone number. If it occurs we should print 'NO' or else 'YES'. Firstly, I stored the possible phone numbers in a list. Then I sorted it in reverse order. I checked whether the phone number occurs as a prefix in other numbers. In order to check I stored every unique possible prefix in a set. Then I compared the possible phone numbers in the set. Then printed the output as required.
Enjoy playing games by buying the gift card from amazon by visiting the link given below.
The program code for phone list kattis solution in python 3 is given below.