Question: whats wrong with my code? ------- bool sameSet(const int *aBeg, const int *aEnd, const int *bBeg, const int *bEnd) { // Add your code yere
whats wrong with my code?
-------
bool sameSet(const int *aBeg, const int *aEnd, const int *bBeg, const int *bEnd) { // Add your code yere while (aBeg != aEnd) { while(bBeg != bBeg) { if(*aBeg != *bBeg) { return false; } else return true; bBeg++; } aBeg++;
}
return true; }

Checking function: sameSet +For input of ARRAY (111}), ARRAY (111, 11, 11)) +For input of ARRAY (1, 4, 9, 16, 9, 7, 4, 9, 11}), ARRAY (111, 11, 7, 9, 16, 4, 1)) X For input of ARRAY (1, 4, 1}), ARRAY (11, 11, 7, 9, 16, 4, 1}) should be false, but is true. X For input of ARRAY (1, 1, 11}), ARRAY (111, 11, 7) should be false, but is true. X For input of ARRAY (1, 4, 9, 16), ARRAY (19, 4, 1,}) should be false, but is true. +For input of ARRAY (111, 11}), ARRAY (11)) X For input of ARRAY (1, 4, 9, 16), ARRAY (19, 4, 1,}) should be false, but is true. +For input of ARRAY (111, 11, 550, 650}), ARRAY (f11, 550, 550, 650, 550)) +For input of ARRAY (111, 11, 11, 11, 2), ARRAY (12,2,2,11}) X For input of ARRAY (1, 4, 91), ARRAY (9, 4, 1,16) should be false, but is true. Tests passing 5/10 (50%)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
