Question: Programming in C Suppose X is a sorted array of size n that may contain duplicate values. Write a function definition that takes X and
Programming in C
Suppose X is a sorted array of size n that may contain duplicate values. Write a function definition that takes X and n as parameters and creates a new array Y that has all the entries of X with all the duplicates removed. For example if X = {1, 5, 5, 5, 7, 8, 8, 9, 9, 9, 10, 11, 12, 12, 12} then Y = {1, 5, 7, 8, 9, 10, 11, 12}. Your function should return the length of Y (as its result) as well as the array itself (as a parameter). parameter).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
