Question: Ques) write a program in c which meets the following requirements. Requirements 1. Create a new file called scrambled.c, containing a single function that matches
Ques) write a program in c which meets the following requirements.

Requirements 1. Create a new file called scrambled.c, containing a single function that matches this declaration int scrambled unsigned int a,unsigned int bl, unsigned int len 2. Arrays a and b are both of length len, and contain values in the range [O.. 99] inclusive, only 3. The function scrambled () should return 1 iff arrays a and b contain the same values in any order, or 0 otherwise 4. len can have any unsigned int value, including O 5. If len is 0 then scrambled() should return 1 (since the arrays have the same empty - contents) 6. You must not change the contents of the arrays. 7. Use an algorithm that has run time linear in the array length n. Note that this means you can not sort the arrays since that can not be done in linear time xamples of arrays for which scrambled should return 1 a 10,15,20), b 10,15,20) a (99), b - 199) a 1,2,3,4,5), b (5,3,4,2,1) a (2,1,3,4,5), b 1,2,4,3,5) Examples of arrays for which scrambled should return 0 a- 1,1), b 1,2) a=(10.15.20), b=(10.15.21) a 1,2,3,4,5), b-5,3,4,2,2) . Example of a program that uses your function 1. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
