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 […]

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.