Question: Need help with a Design and Analysis of Algorithms question: Given a collection of n nuts, and a collection of n bolts, each arranged in
Need help with a Design and Analysis of Algorithms question:

Given a collection of n nuts, and a collection of n bolts, each arranged in an increasing order of size, give an O(n) time algorithm to check if there is a nut and a bolt that have the same size. You can assume that the sizes of the nuts and bolts are stored in the arrays NUTS[1.n and BOLTS[1..n], respectively, where NUTS[I]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
