Question: Define a function isSmaller ( ) that takes two integer vector parameters. The function returns true if the two vectors have the same size, and

Define a function isSmaller() that takes two integer vector parameters. The function returns true if the two vectors have the same size, and every element in the first vector is less than the element at the same index in the second vector. The function returns false otherwise.
Ex: If the input is:
2
16-19
3
-5-21-1
then the first vector has 2 elements {16,-19} and the second vector has 3 elements {-5,-21,-1}. The output is:
False, the first vector is not element-wise less than the second vector.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!