Yahoo Interview Question

Give a string , find the longest part that jave same character

Interview Answers

Anonymous

Aug 8, 2019

Declare 3 variables call current, temp, longgest = 0. Then create array to hold the longest part, and an other array to hold temp. Put the first element on current compare with second if same then temp + 1, if temp > longest then longest = temp, and add in to longgest array, also add it in to temp array

Anonymous

Oct 11, 2019

What were the questions during the onsite interview?