Question: In C#: Write a program that has a array of characters and that deletes all repeated letters from the array. When a letter is deleted,
In C#: Write a program that has a array of characters and that deletes all repeated letters from the array. When a letter is deleted, the remaining letters are moved forward to fill in the gap. This will create empty positions at the end of the array so that less of the array is used.
For example, consider the following code: a[10]; a[0] = 'a'; a[1] = 'b'; a[2] = 'a'; a[3] = 'c'
After this code is executed, the value of a[0] is 'a', the value of a[1] is 'b', the value of a[2] is 'c'. (The value of a[3] is no longer of any concern, since the partially filled array no longer uses this indexed variable.) Your code should print out the new values in the array when finished to show there are no longer any duplicate values.
Any help would be greatly appreciated.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
