Logger Rate Limiter Solution (LeetCode)
This question is from the LeetCode Challenge (Aug-2020). See the original question here Design a logger system that receive a stream of messages along with its timestamps, each message should be printed if and only if it is not printed in the last 10 seconds. Given a message and a timestamp (in seconds granularity), return […]
Max Distance between two occurrences of the same element
Given an array of integers where elements may be repeating in the array. Find the maximum distance between two occurrences of the same element in the array.
Count max points on a line
Given n points on a 2D plane with (x, y) co-ordinates. Find the maximum number of points lie on the same straight line.