3380. Maximum Area Rectangle With Point Constraints I | Array | Sorting | Math

  Рет қаралды 992

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 5
@ARYANMITTAL
@ARYANMITTAL 11 күн бұрын
Agar accha lage & aur Contest Solutions ke naam pr ek like thok dena plssss
@Jazzimus
@Jazzimus 10 күн бұрын
Another optimization over this: we actually only need 2 points (the opposite points) to define a rectangle. Let these opposite points be some: (xi, yi) and (xj, yj). Then the other 2 opposing points will be: (xi, yj), (xj, jy). We can check for their existence via a map (after storing them obviously), and then finding area and and checking for inside points can be the same. This lowers complexity from O(n^5) to O(n^3), since we are only brute forcing a combination of 2 points. This allows the code to pass for n
@srinivasnakka4960
@srinivasnakka4960 11 күн бұрын
Today last question Consider every point as top left point and binary search for left closest point to it and with same y cordinate then same way for bottom closest point with same x coordinate then we get fourth point now there one more thing you need to check is there any point in the formed rectangle . I am not sure is there any standard searching algorithm in cpp for this kind of search
@ajayc815
@ajayc815 11 күн бұрын
🥰🥰🥰🥰🥰
@Its_Shubham_Negi
@Its_Shubham_Negi 11 күн бұрын
Today's last q involved fenwick trees ig
3371. Identify the Largest Outlier in an Array | Hash Table | Math
12:33
MINIMUM AREA RECTANGLE | GOOGLE INTERVIEW QUESTION | PYTHON SOLUTION
14:16
769. Max Chunks To Make Sorted | Prefix Sums | Multiple Approaches
14:09