Sunidhi Bansal has Published 1100 Articles

Count number of binary strings without consecutive 1's in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:40:23

228 Views

Given the task is to count the number of all the binary strings of length n without any consecutive 1’s.Binary Number System is one the type of Number Representation techniques. It is most popular and used in digital systems. The binary system is used for representing binary quantities which can ... Read More

Containers in Bootstrap with examples(3)

Sunidhi Bansal

Sunidhi Bansal

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

303 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

841 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

292 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

Count number of edges in an undirected graph in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 06-Jun-2020 11:23:54

896 Views

Given the task is to count the number of edges in an undirected graph. An undirected graph is a set of vertices which are connected together to form a graph, whose all the edges are bidirectional. Undirected graphs can travel in any direction from one node to another connected node.Below ... Read More

Count number of bits changed after adding 1 to given N in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:52:46

121 Views

We are given a number let’s say num and the task is to calculate the total number of bits changed when 1 is added to a number.Binary representation of a number is done by converting the given number into the form of 0’s and 1’s and it is done by ... Read More

Count number of binary strings of length N having only 0’s and 1’s in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:50:50

443 Views

We are given a number let’s say, num and the task is to calculate the count of binary strings that can be formed through the given number num containing only o’s and 1’s.Binary Number System is one the type of Number Representation techniques. It is most popular and used in ... Read More

Count full nodes in a Binary tree (Iterative and Recursive) in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:48:59

993 Views

We are given a binary tree and the task is to calculate the count of full nodes available in a binary tree using iterative and recursive approach. Full nodes are those nodes who have both the children and no child is null. Note that in full nodes we consider nodes ... Read More

Count half nodes in a Binary tree (Iterative and Recursive) in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:43:29

331 Views

We are given a binary tree and the task is to calculate the count of half nodes available in a binary tree using iterative and recursive approach. Half nodes are those nodes who have only one child and another child is null. Note that in half nodes we don't consider ... Read More

Count elements in a vector that match a target value or condition in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 15-May-2020 12:23:16

455 Views

We are given a vector and the task is to calculate the count of those elements in a vector that matches a target value or condition.Vectors are sequence containers that can change size. Container is an object that holds data of the same type. Sequence containers store elements strictly in ... Read More

Advertisements