Microsoft Interview Question

You are given an array with a null value on each end of the array. The array is populated with a random string (for instance "aabbca"). You must integrate through the array from each end and count the number of specific characters in the array.

Interview Answer

Anonymous

Oct 11, 2012

parse the array, put the values into a hashset, in the end, get a count of elements in the set.