Menu

[solved] – Question 70718

You are given a set of ‘n’ chemical compounds which have to be packed in two boxes. Some of ​​the​​ chemicals​ ​may​ ​react​​ with​ ​other ​​chemical s​​and​​ should​​ not ​​be ​​packed​​ in​​ the​​ same​​ box.
Code an ​efficient algorithm in/C++ that determines if it is possible to safely pack these chemicals in two boxes and if so, then print which chemicals should go in Box-1​​ and​​ which​​ in​​ Box-2.
n6
C0: C1,C2
C1: C0,C3,C5
C2: C0
C3: C4,C1
C4: C3
C5: C1

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *