avatar_url

Sandesh Rana | Python

I'm a developer from Himalayas, with a passion for crafting efficient and elegant code, with creativity and precision.

Geometry

21 Aug 2024 » programming, math

Geometry: Easy to Hard Problems

Easy

  1. Valid Triangle Number (Determines if three sides can form a valid triangle)
  2. Rectangle Overlap (Checks if two rectangles overlap)
  3. Intersection of Two Arrays II (Finds the intersection of two arrays, considering duplicates)
  4. Rotate Image (Rotates a matrix by 90 degrees)
  5. Is Point on Line Segment (Determines if a point lies on a line segment)

Medium

  1. Largest Rectangle in Histogram (Finds the largest rectangle that can be formed in a histogram)
  2. 3D Surface Area (Calculates the surface area of 3D shapes based on their projections)
  3. Minimum Area Rectangle (Finds the minimum area of a rectangle formed by points in a grid)
  4. Find the Missing Point (Finds a missing point to complete a rectangle with given points)
  5. Count Number of Rectangles (Counts the number of possible rectangles from a list of lengths and widths)

Hard

  1. Maximal Rectangle (Finds the largest rectangle of 1s in a binary matrix)
  2. Minimum Enclosing Circle (Finds the smallest circle that encloses a set of points)
  3. Largest Divisible Subset (Finds the largest subset such that every pair in the subset is divisible)
  4. Polygon Area (Calculates the area of a polygon given its vertices)
  5. Point in Polygon (Determines if a point lies inside a given polygon)