Given number of cuts, find the maximum number of possible pieces.
This problem is nothing but The Lazy Caterer’s Problem and has below formula.
Maximum number of pieces = 1 + n*(n+1)/2
Refer this for proof.
This article is contributed by DANISH_RAZA. 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 write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
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.
- Non-crossing lines to connect points in a circle
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- Equation of circle when three points on the circle are given
- Check if a circle lies inside another circle or not
- Angle subtended by the chord to center of the circle when the angle subtended by the another equal chord of a congruent circle is given
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Area of the circle that has a square and a circle inscribed in it
- Paper Cut into Minimum Number of Squares
- Minimum squares to evenly cut a rectangle
- Maximum given sized rectangles that can be cut out of a sheet of paper
- Minimum lines to cover all points
- Number of Triangles that can be formed given a set of lines in Euclidean Plane
- Program for Point of Intersection of Two Lines
- Find intersection point of lines inside a section
- Number of parallelograms when n horizontal parallel lines intersect m vertical parallellines
- Count of different straight lines with total n points with m collinear
- Check if three straight lines are concurrent or not
- Maximum distinct lines passing through a single point
- Maximum points of intersection n lines
- Check whether two straight lines are orthogonal or not