Question: Write a java program that contains a method called deleteRepeats that takes a partially filled array of char and the number of elements used as
Write a java program that contains a method called deleteRepeats that takes a partially filled array of char and the number of elements used as arguments. The program will delete all repeated letters in the array and shift the remaining letters up to fill the gap. Return the new number of remaining elements as an integer. For example if the array had: 'a' 'b' 'c' 'b' 'd' numberElements = 5 after: 'a' 'b' 'c' 'd' numberElements = 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
