Given four positive integers, determine if there’s a rectangle such that the lengths of its sides are a, b, c and d (in any order).
Input : 1 1 2 2 Output : Yes Input : 1 2 3 4 Output : No
Approach 1 :- We will check, if any of the two integers are equal and make sure rest of two are also equal using few if else conditions.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Check if four segments form a rectangle
- Find Four points such that they form a square whose sides are parallel to x and y axes
- Number of triangles formed by joining vertices of n-sided polygon with two common sides and no common sides
- Number of ways N can be divided into four parts to construct a rectangle
- Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW
- Check whether four points make a parallelogram
- Largest subset of rectangles such that no rectangle fit in any other rectangle
- How to check if given four points form a square
- Check whether triangle is valid or not if sides are given
- Check if it is possible to create a polygon with given n sides
- Check whether a given point lies inside a rectangle or not
- Check whether a given point lies on or inside the rectangle | Set 3
- Check if any point overlaps the given Circle and Rectangle
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
- Maximize volume of cuboid with given sum of sides
- Area of the circumcircle of any triangles with sides given
- Find area of parallelogram if vectors of two adjacent sides are given
- Find area of triangle if two vectors of two adjacent sides are given
- Find the type of triangle from the given sides
- Count number of triangles possible for the given sides range
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.