Karthikeya Boyini has Published 2383 Articles

MySQL query to find all rows where string contains less than four characters?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

265 Views

Use CHAR_LENGTH() and find the count of characters in every string and then get the strings which are less than four characters. Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(100) -> ); Query OK, ... Read More

C++ Program to Find ith Largest Number from a Given List Using Order-Statistic Algorithm

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

153 Views

This is a C++ program to find ith largest number from a given list using Order-Statistic Algorithm.AlgorithmsBegin    function Insert() to insert nodes into the tree:    Arguments:       root, d.       Body of the function:       If tree is completely null then insert ... Read More

Sum of the first N Prime numbers

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

The program to print the sum of the first N prime numbers uses the method to find n prime numbers and then add them to find the sum. This sum is saved to an integer that outputs the sum .The code takes a number checks it for prime, if it ... Read More

1’s and 2’s complement of a Binary Number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

4K+ Views

Binary Number is expressed in base 2. It uses only two digits ‘0’ and ‘1’. Each digit in a binary number is a bit.Sample binary Number − 01000101111’s ComplementOne's complement of a binary number is obtained by reversing the digits of the binary number i.e. transforming 1 with 0 and ... Read More

Average of odd numbers till a given odd number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

The average of odd numbers till a given odd number is a simple concept. You just need to find odd numbers till that number then take their sum and divide by the number.If average of odd number till n is to be found. Then we will find odd numbers from ... Read More

C++ Program to Find the Number of occurrences of a given Number using Binary Search approach

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

169 Views

This is a C++ program to find the number of occurrences of a given number using Binary Search approach.AlgorithmsBegin    function Insert() to insert nodes into the tree:    Arguments:       root, d.       Body of the function:       Create node using data from ... Read More

Average of even numbers till a given even number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

To find the average of even numbers till a given even number, we will add all the even number till the given number and t count the number of even numbers. Then divide the sum by the number of even numbers.ExampleAverage of even numbers till 10 is 6 i.e.2 + ... Read More

C++ Program to Generate All Possible Combinations of a Given List of Numbers

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

2K+ Views

This is a C++ program to generate all possible combinations of a given list of numbersAlgorithmsBegin    Take the number of elements and the elements as input.    function Combi(char a[], int reqLen, int s, int currLen, bool check[], int l) :    If currLen>reqLen then    Return    Else ... Read More

Area of a circle inscribed in a regular hexagon?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

The circle inscribed in a regular hexagon has 6 points touching the six sides of the regular hexagon.To find the area of inscribed circle we need to find the radius first. For the regular hexagon the radius is found using the formula, a(√3)/2.Now area of the circle inscribed is 3πa*a/4SampleSide ... Read More

Area of a Circular Sector?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

654 Views

A circular sector also known as circle sector / sector of a circle is the portion of the circle that is inscribed by between 2 radii. This area is enclosed between two radii and an arc. To find the area inscribed we need to find the angle that is between ... Read More

Advertisements