Sunidhi Bansal has Published 1100 Articles

Maximum factors formed by two numbers in Python

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:30:26

911 Views

We are given with an array of integer type elements and the task is to find the maximum factors formed by multiplying two numbers i.e. firstly we will multiply the numbers present in an array like calculating cross product secondly, we will calculate the factors of those numbers and check ... Read More

Count how many times the given digital clock shows identical digits in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:29:04

268 Views

Suppose we have a digital clock of type HH:MM. Which shows the time in hours and minutes only. We are given a number of hours and minutes as input. The goal is to count the number of times all digits are the same. H=M.This happens 3 times a day, first ... Read More

Count binary strings with k times appearing adjacent two set bits in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:27:51

350 Views

We are given with integers N and K. We have binary strings of length N, containing 0’s and 1’s only. The goal is to find the number of such strings of length N that have K consecutive 1’s. I.e, if N=3, and K=2, then count all 3-digit binary strings possible ... Read More

Conventional Computing vs Quantum Computing in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:25:55

682 Views

As the computing world is constantly improvising. Everyday a new device comes into picture which makes previous versions unfit for current technological changes and development. Gone are the days when computers were room sized and calculations take hours.From vacuum tubes, transistors and integrated circuits to touch screen devices, the technological ... Read More

Contributing to Open Source : Getting Started in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:24:04

630 Views

What is an Open Source?Open Source is the term generally referred to as Open Source Software (OSS) in the software world. An OSS is generally the one which is freely available on the internet, to use, modify, test, and develop further accordingly. OSS is more convenient to use by various ... Read More

Count BST subtrees that lie in given range in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:20:22

171 Views

We are given a Binary search tree as an input. The goal is to find the count of subtrees in BST which have node values in between the range of start and end. If start is 5 and end is 50. Then count subtrees in BST whose all nodes have ... Read More

Count distinct points visited on the number line in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:16:25

91 Views

We are given a binary sequence of 0’s and 1’s. Also assume a person is sitting at a position or point stored in current_pos. Now starting from current_pos, if the binary sequence has 0 then he moves one step left ( current_pos - 1). If it’s 1 he moves one ... Read More

Count Distinct Non-Negative Integer Pairs (x, y) that Satisfy the Inequality x*x +y*y < n in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:13:34

297 Views

We are given a positive integer N. The goal is to count the pairs of distinct non-negative positive integers that satisfy the inequality: x*x + y*y < NWe will start from x=0 to x2 < N and y=0 to y2 < N . If any x2 + y2 < N, ... Read More

Maximise the number of toys that can be purchased with amount K in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:10:58

1K+ Views

We are given with the prices of toys in the form of an array and an amount K in hand. The goal is to purchase the maximum no. of toys with that amount. Each element of the array is a price of a single toy, so no. of toys is ... Read More

Maximum and minimum isolated vertices in a graph in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 03-Aug-2020 10:10:08

356 Views

We are given with the number of edges Noe and number of vertices Nov. The goal is to find the minimum and maximum number of isolated vertices that are possible in such graphs which have no edges and No vertices count.An isolated vertex is the one that has no edge ... Read More

Advertisements