1. Majority. A value in an array of length n is a majority if it appears strictly more than n / 2 times. Given an array of strings, design a linear-time algorithm to identify a majority element (if one exists).
2. Largest empty interval. Given n timestamps for when a file is requested from a web server, find the largest interval of time in which no file is requested. Write a program to solve this problem in linearithmic time.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here