Google US Onsite April 5th 2022

Had google onsite interview on April 5th 2022. Was asked the following questions.

Question 1 : A value is popular if it occurs in at least ¼ of the elements of the sorted input
Implement a hasPopularValue that returns true if there is a popular element.
boolean hasPopularValue(List sortedVals)

Question 2 : Given a dataset of string of chars find the longest palindrome length.

Comments (5)