Discussion for BREAKUP ( Code Chronicles 2.0 )

I would like to discuss the problem https://www.codechef.com/CHIL2020/problems/BREAKUP
in https://www.codechef.com/CHIL2020 ,as the event is over

( Basically i would like to find out unique test cases where my code fails)
As soon as i saw the problem
I came up with an approach of determing the right solution by

Take the first phone number (N1) then then check if phone number 2 (N2)
if any digit of N2 exists in N1 connect them
if not then send them for deletion

Deletion>
3 steps
take a number and check more of it exists
yes ( more numbers exists) > check if they are only at concurrent positions ( left and right both)

yes concurrent
delete all
not concurrent
ignore for now and move to next number

no ( no extra exists)> delete it and increase the cost

My apporach works perfectly for the provided test cases
So is my solution https://www.codechef.com/viewsolution/36510267
but its not the right solution
So I am eger to listen to your approach or test cases where i may go wrong
thanks for giving me your precious time in reading this <3 :slight_smile:

1 Like