## Largest hexagon that can be inscribed within an equilateral triangle

Given an equilateral triangle of side length a, the task is to find the largest hexagon that can be inscribed within it. Examples: Input: a… Read More »

- Reach the numbers by making jumps of two given lengths
- Reverse middle words of a string
- Iterative Letter Combinations of a Phone Number
- Smallest Pair Sum in an array
- Zig-Zag traversal of a Binary Tree using Recursion
- Number of pairs whose sum is a power of 2
- CSV file management using C++
- Passing and Returning Objects in C++
- Program to print Step Pattern
- Find the Nth term of the series 14, 28, 20, 40,.....
- Clockwise Spiral Traversal of Binary Tree
- Program to find the kth character after decrypting a string
- Find Maximum and Minimum element in a Set in C++ STL
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Iterative Boundary traversal of Complete Binary tree
- Program to print the given Z Pattern
- Shortest path on a Square
- How to delete last element from a set in C++
- Split a string in equal parts such that all parts are palindromes
- Importance of macros in C++
- How to find the minimum and maximum element of a Vector using STL in C++?
- Programs for printing pyramid patterns using recursion
- Sum of Bitwise-OR of all subarrays of a given Array | Set 2
- Sum of minimum elements of all possible sub-arrays of an array
- Finding Floor and Ceil of a Sorted Array using C++ STL
- Find the element having different frequency than other array elements
- Sort an array of string of dates in ascending order
- Determine the count of Leaf nodes in an N-ary tree
- Find maximum among all right nodes in Binary Tree
- Number of Hamiltonian cycle

Given an equilateral triangle of side length a, the task is to find the largest hexagon that can be inscribed within it. Examples: Input: a… Read More »

Given an integer a which is the side of a regular hexagon, the task is to find and print the length of its diagonal. Examples:… Read More »

Given an integer a which is the side of a regular pentagon, the task is to find and print the length of its diagonal. Examples:… Read More »

Given an integer h which is the side of an equilateral triangle formed by the same vertices as the Reuleaux triangle, the task is to… Read More »

Given an array arr[] of positive integers, the task is to count the maximum possible number of pairs (arr[i], arr[j]) such that arr[i] + arr[j]… Read More »

Given an integer N, the task is to print the Alphabet H Pattern as given below: 1 N 2 * 3 3 * 2 N… Read More »

Given an integer d which is the length of the diagonal of a pentagon, the task is to find the area of that pentagon. Examples:… Read More »

Given a string str the task is to expand the string as follows: If the string is abcd, the resultant string will be d, cd,… Read More »

Given an array of strings dates[], the task is to sort these dates in ascending order. Note: Each date is of the form dd mmm… Read More »

Given a string str, print reverse all words except the first and last words. Examples: Input : Hi how are you geeks Output : Hi… Read More »

Given a cube of side length a. The task is to find the volume of biggest right circular cylinder that can be inscribed within it.… Read More »

Given an array of N integers. Each element in the array occurs same number of times except one element. The task is to find this… Read More »

Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More »

Given a string str which contains the source code (C/C++/Java code) which is not arranged in a proper way, the task is to format that… Read More »

Given three integers a, b and x, the task is to get the multiple of x which is closest to ab. Examples: Input: a =… Read More »