# emmanuel1997 ## Max Points on a Line (Hard)

Description: Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return the maximum number of points that lie on the same straight line. Solution: Explanation At first, this problem doesn’t look so hard, you just have to calculate the line equation, using two pints and the slope you can check if the points are … ## Find First and Last Position of Element in Sorted Array

Description Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. Solution Performance Explanation  By the description we know that the solution has to be, O(log n) this hit us that we must … ## Container With Most Water

Description You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines that together with the x-axis form a container, such that the container contains the most water. Return the maximum amount of water a container can store. Explanation To calculate the area …