Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.

Get a Professional Answer

Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.

100% Satisfaction Guarantee

Rate the answer you receive.

Ask Ryan Your Own Question

Ryan, Engineer

Category: Homework

Satisfied Customers: 8953

Experience: B.S. in Civil Engineering

40260889

Type Your Homework Question Here...

Ryan is online now

Given a collection of n nuts, and a collection of n bolts,

This answer was rated:

★★★★★

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 match (i.e., 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