Sunidhi Bansal has Published 1085 Articles

Count Number of animals in a zoo from given number of head and legs in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 12:04:31

1K+ Views

We are given a total number of heads and legs in a zoo and the task is to calculate the total number of animals there in the zoo with the given data. In the below program we are considering animals to be deer and peacocks.Input −heads = 60 legs = ... Read More

Count frequency of k in a matrix of size n where matrix(i, j) = i+j in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 12:00:30

291 Views

We are given a matrix of integer values and the task is to calculate the count of the frequency of a given integer variable let’s say, k in the matrix. The size of a matrix can depend upon the size the user wants and in the below program we are ... Read More

Count n digit numbers not having a particular digit in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:56:53

271 Views

We are given a number let’s say, num and a total number of digits stored in an integer type variable let’s say, digi and the task is to calculate the count of those n digits numbers that can be formed where the given digit is not there.Input − n = ... Read More

Count digits in given number N which divide N in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:53:47

2K+ Views

We are given a number let’s say, N and the task is to find the count of those digits in a number that divides the number N.Points to be rememberIf the digit is 0 then it should be ignored which means count will not be increased for 0.If a digit ... Read More

Count n digit numbers divisible by given number in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:51:27

412 Views

We are given the two elements let’s say, d and num, the task is to find the d digit numbers which are divisible by num.In simple words let us suppose we have given an input 2 in d, so we will first find all the 2-digit numbers i.e. from 10-99 ... Read More

Count entries equal to x in a special matrix in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:49:25

361 Views

Given a square matrix, mat[][] let the elements of the matrix me mat[i][j] = i*j, the task is to count the number of elements in the matrix is equal to x.Matrix is like a 2d array in which numbers or elements are represented as rows and columns.So, let's understand the ... Read More

Maximum area of rectangle possible with given perimeter in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:44:04

389 Views

Given a perimeter of a rectangle, the task is to find the maximum area of the rectangle with that given perimeter.A rectangle is a type of parallelogram whose opposite sides are equal and parallel.The perimeter of a rectangle is the sum of all sides of a rectangle; we can also ... Read More

Containers in Bootstrap with examples(3)

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:37:27

443 Views

As the name suggests, a container is used to hold or bind something likewise containers in bootstrap are used for storing or binding the content over a viewport. Containers add padding to the content by providing it margin from all the four sides of a viewport and it can also ... Read More

set vs unordered_set in C++ STL(3)

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:32:02

1K+ Views

In this article, let us understand what is set and unordered_set in C++ STL and thereby gain knowledge of difference between them.What is set?A set is an Associative container which contains a sorted set of unique objects of type Key. Each element may occur only once, so duplicates are not ... Read More

Count minimum frequency elements in a linked list in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:28:07

398 Views

Given the task is to count the minimum frequency elements in a given linked list which is having duplicate elements.A linked list is a data structure in which the data is stored in the serial order, like a list each element is linked to the next element.The frequency of an ... Read More

Advertisements