Skip to content

Tag Archives: square-rectangle

Given a positive integer S, the task is to find the length of diagonal of a square having sides of length S. Examples: Input: S… Read More
Given two arrays X[] and Y[], each of length 4, where (X[0], Y[0]) and (X[1], Y[1]) represents the bottom left and top right corners of… Read More
Given three positive integers N, M, and A, the task is to count the number of rectangles with area equal to A present in an… Read More
Given a 2D array A[][2] of size N (1 ≤ N ≤ 103), where A[i][0] and A[i][1] denotes the length and breadth of rectangle i… Read More
Given a 2D array rectangle[][] representing vertices of a rectangle {(0, 0), (L, 0), (0, B), (L, B)} of dimensions L * B, and another… Read More
Given two integers N and K, the task is to find the number of squares of size K that is inscribed in a square of… Read More
Given two binary arrays A[] and B[], of length N and M respectively, the task is to find the number of rectangles of area K… Read More
Given a rectangle of dimensions L and W. The task is to find the maximum area of a rectangle that can be circumscribed about a… Read More
Given one of the Sides S, Diagonal D, or Perimeter P of the square, the task is to find the area of the square with… Read More
Given N axis-parallel rectangles in a 2-D Cartesian coordinate system and coordinates of 4N-1 vertices, the task is to find the single vertex missing. Examples:  … Read More
Given height H, and width W, of a rectangle, the task is to find the side of a square of the minimum area in which… Read More
Given an array arr[] of positive integers where each element of the array represents the length of the rectangular blocks. The task is to find… Read More
Given a matrix A[][] consisting of coordinates of N rectangles such that {A[i][0], A[i][1]} representing bottom left coordinate of rectangle and {A[i][2], A[i][3]} representing top… Read More
Given two integers N and M, where N straight lines are parallel to the X-axis and M straight lines are parallel to Y-axis, the task… Read More
Given N * M rectangular park having N rows and M columns, each cell of the park is a square of unit area and boundaries… Read More