Sudhir sharma has Published 1218 Articles

3-digit Osiris number in C?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:50:08

90 Views

Osiris Number is a number whose value is equal to the sum of values of all number formed by adding all the permutations of its own digits.In this problem, we are given a 3-Digit number N, and we will check weather the number N is an Osiris number.Let’s take an ... Read More

Angular Sweep Algorithm in C++

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:48:06

355 Views

The algorithm to find the maximum number of points that can be enclosed in a circle of a given radius. This means that for a circle of radius r and a given set of 2-D points, we need to find the maximum number of points that are enclosed (lying inside ... Read More

C++ set for user defined data type?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:43:38

249 Views

A set is a data structure that stores numeric values. The speciality of sets is that the elements are distinct (i.e. no two elements have the same value). Also the values are stored in ascending order. You can explicitly define the data type of a set in C++ i.e. a ... Read More

The basic_string c_str function in C++ STL?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:39:11

50 Views

The basic_string c_str function that returns a pointer to an array of characters that is terminated using null character. It is an inbuilt method that has the value of a string that has null character termination.Syntax to define a c_str function in C++ −const Char ptr* c_str() constAbout the functionIt ... Read More

Area of squares formed by joining midpoints repeatedly in C?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:24:05

45 Views

Area of a square is equal to the product of sides of the square.We are considering a figure in which the midpoints of sides of each square make another square. And so on until a specific number of squares.This figure shows a square made by joining the midpoints of a ... Read More

Area of the biggest possible rhombus that can be inscribed in a rectangle in C?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:13:52

152 Views

A rhombus inscribed in a rectangle touches the sides of the rectangle so by this we can infer that the diagonals of the largest inscribed rhombus are equal to the length and breadth of the rectangle.If we have the length(l) and breadth(b) of the rectangle, the length of the diagonal ... Read More

Area of a circle inscribed in a rectangle which is inscribed in a semicircle in C?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:10:41

1K+ Views

A circle inscribed in a rectangle touches the larger side of the rectangle with its ends i.e. the length is tangent to the circle.A rectangle inscribed in a semicircle touches its arc at two points. The breadth of the rectangle is equal to the diameter of the circle.If R is ... Read More

Anti Clockwise spiral traversal of a binary tree in C++?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:02:36

96 Views

Anti-Clockwise spiral traversal of a binary tree is traversing the elements of a tree in such a way that if traversed they make a spiral but in reverse order. The following figure shows how a anti-clockwise spiral traversal of binary tree.The Algorithm defined for spiral traversal of a binary tree ... Read More

Arc length from given Angle in C++?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 12:58:30

307 Views

An Angle is formed when two rays meet at a point. The point on the plane at which these rays meet is vertex.Arc of a circle is a portion of the circumference that is described by an angle.In this problem, we are given an angle of the circle. And we ... Read More

Absolute Difference of even and odd indexed elements in an Array in C++?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 12:54:24

717 Views

An array is a container of multiple elements of the same data type. The index of elements start from 0 i.e. first element has index 0.In this problem, we need to find the absolute difference between two even indexed number and two odd indexed numbers.Even indexed number = 0, 2, ... Read More

Advertisements