Bolt and screw - algorithm or pseudo code
Hi I am preparing for an interview, and I found this question in one of the placement papers, I needed some help in getting this one.

**Question**

There are ‘n’ number of screws and bolts each. No two screws have same thickness and likewise for bolts. Also every screw has a corresponding bolt of the same thickness. Now screws and bolts have to be sorted in their order of thickness. The catch in the problem is that screw’s thickness cannot be compared by taking two screws. Only a bolt and screw can have their thickness compared. It can be one of 3 conditions a) Bolt will fit exactly b) Bolt will be loose c) Bolt will not go in the screw.
Bolt and screw - algorithm or pseudo code
===

Hi I am preparing for an interview, and I found this question in one of the placement papers, I needed some help in getting this one.

**Question**

There are ‘n’ number of screws and bolts each. No two screws have same thickness and likewise for bolts. Also every screw has a corresponding bolt of the same thickness. Now screws and bolts have to be sorted in their order of thickness. The catch in the problem is that screw’s thickness cannot be compared by taking two screws. Only a bolt and screw can have their thickness compared. It can be one of 3 conditions a) Bolt will fit exactly b) Bolt will be loose c) Bolt will not go in the screw.