# C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

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

C++ Checking if a Given Graph is Bipartite -
Bipartite Graph is a graph in which the set of 'vertices' can be divided into 2 sets such that all vertex should be present in either set 1 or set 2 but not both, and there should no edge

Structure is A Compound Data Type that -
To store Student details like student 'name', student 'roll num', 'student age'. You have 2 ways to do it, one way is to create different variables for each data, but the downfall of

C Compute the Sum of Digits in an Integer -
C Program take the integer as input. Divide the input integer by 10, obtain its remainder and quotient. Increment the new variable with the remainder got at step 2. Repeat the

C Codings to HCF Highest Common Factor -
Program to Find HCF In C language. An H.C.F or Highest Common Factor, largest common factor of two or more values. For example 12 > 1, 2, 3, 4, 6, 12 and 18 > 1, 2, 4, 8, 18. HCF=4

C Program Compare Strings Using StrCmp -
C program to compare two strings using loop character by character. Logic to compare two strings. Input two strings from user and Store it in some variable say str1 and str2. Compare

Codes Binary Number to Decimal Number -
Takes the binary number (entered by user) as input and converts it into a decimal number using function. To understand this program, you should be familiar with the following C...

Code Finds the Sum of 2 Binary Numbers -
Take two Binary Numbers as input. Add each bits from the two binary numbers separately starting from LSB. The operations may be as follows. a) (0+0)=0, b) (1+0)=1, c) (1+1)=0 and

Program to Solve The Fractional Knapsack -
Given a 'set of items', each with a mass and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to given limit & the total