Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
Mathematical
5.1K+ articles
C++ Programs
1.5K+ articles
Matrix
743+ articles
Geometric
521+ articles
area-volume-programs
132+ articles
Geometric-Lines
86+ articles
circle
71+ articles
square-rectangle
86 posts
Recent Articles
Popular Articles
Squarable Numbers
Last Updated: 15 June 2022
Given a positive integer N, the task is to check if N is a Squarable Number or not.An integer "N" is said to be Squarable, if we can divide a square into N non-overlapping...
read more
Computer Science Fundamentals
square-rectangle
Count of maximum distinct Rectangles possible with given Perimeter
Last Updated: 09 February 2022
Given an integer N denoting the perimeter of a rectangle. The task is to find the number of distinct rectangles possible with a given perimeter.ExamplesInput: N = 10Output...
read more
Misc
Mathematical
Geometric
DSA
square-rectangle
C++ Program to Find all rectangles filled with 0
Last Updated: 23 July 2025
We have one 2D array, filled with zeros and ones. We have to find the starting point and ending point of all rectangles filled with 0. It is given that rectangles are sepa...
read more
C++
square-rectangle
Python Program to Find all rectangles filled with 0
Last Updated: 23 July 2025
We have one 2D array, filled with zeros and ones. We have to find the starting point and ending point of all rectangles filled with 0. It is given that rectangles are sepa...
read more
Python
square-rectangle
Find number of rectangles that can be formed from a given set of coordinates
Last Updated: 23 July 2025
Given an array arr[][] consisting of pair of integers denoting coordinates. The task is to count the total number of rectangles that can be formed using given coordinates....
read more
DSA
square-rectangle
Form a Rectangle from boundary elements of Matrix using Linked List
Last Updated: 23 July 2025
Given a Matrix grid[][] of size NxM where N is number of rows and M is number of columns. The task is to form a rectangle from boundary elements of grid[][] using linked l...
read more
Linked List
Mathematical
Geometric
Matrix
Blogathon
Blogathon-2021
DSA
square-rectangle
Find vertex coordinates of all possible rectangles with a given vertex and dimensions
Last Updated: 23 July 2025
Given two integers L and B representing the length and breadth of a rectangle and a coordinate (X, Y) representing a point on the cartesian plane, the task is to find coor...
read more
DSA
square-rectangle
Find the coordinate that does not belong to any square
Last Updated: 23 July 2025
Given an array arr[] consisting of (4 * N + 1) pairs of coordinates representing the coordinates of the corners of any N squares such that only one coordinate doesn't belo...
read more
DSA
square-rectangle
Geometric-Lines
Make N pairs from Array as (X, Y) coordinate point that are enclosed inside a minimum area rectangle
Last Updated: 23 July 2025
Given a number N, and an array A[] of size 2N, the task is to make N pairs of these array elements and place them on an X-Y coordinate plane, such that they are enclosed i...
read more
DSA
square-rectangle
Maximum area of a Cake after Horizontal and Vertical cuts
Last Updated: 24 February 2025
Given two positive integers h and w representing the height and width of a rectangle. Additionally, we have two arrays, horizontalCutsandverticalCuts, where:horizontalCuts...
read more
DSA
area-volume-programs
square-rectangle
Size of smallest square that contains N non-overlapping rectangles of given dimensions
Last Updated: 23 July 2025
Given two positive integers W and H and N rectangles of dimension W*H, the task is to find the smallest size of the square required such that all the N rectangles can be p...
read more
Searching
Mathematical
Geometric
DSA
Binary Search
square-rectangle
Geometric-Lines
Area of a triangle with two vertices at midpoints of opposite sides of a square and the other vertex lying on vertex of a square
Last Updated: 23 July 2025
Given a positive integer N representing the side of a square, the task is to find the area of a triangle formed by connecting the midpoints of two adjacent sides and verte...
read more
Mathematical
Geometric
DSA
triangle
area-volume-programs
square-rectangle
Number of points lying inside a rectangle as well as a triangle
Last Updated: 23 July 2025
Given two 2D arrays rectangle[][] and triangle[][], representing the coordinates of vertices of a rectangle and a triangle respectively, and another array points[][] consi...
read more
Greedy
Mathematical
Geometric
DSA
triangle
square-rectangle
Geometric-Lines
Coordinate Geometry
Program to calculate length of diagonal of a square
Last Updated: 23 July 2025
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 = 10Output: 14.1421Explanation: The length of...
read more
Misc
Mathematical
Geometric
DSA
square-rectangle
Perimeter of the Union of Two Rectangles
Last Updated: 23 July 2025
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 one rectangle and (X[2], Y[2]) and ...
read more
DSA
square-rectangle
Geometric-Lines
1
2
3
4
5
6
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !