×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Tutorix
Login
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Q/A
Library
eBooks
Courses
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Hafeezul Kareem
has Published
387
Answers
Number of even substrings in a string of digits in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 05:14:00
Given a string of digits, we need to find the count of even substrings in it. Let's see an example.Inputnum = "1234"Output6The even substrings that can be formed from the given string are2 12 4 34 234 1234AlgorithmInitialise the string with digits.Initialise the count to 0.Iterate over the string.Get the ...
Read More
Number of elements smaller than root using preorder traversal of a BST in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 05:12:28
You are given the result of the preorder traversal. You need to find the number of elements that are smaller than the root.The first element in the preorder traversal is the root of the BST. Let's see an example.Inputpreorder_result = [5, 4, 2, 1, 7, 6, 8, 9]Output3 There are ...
Read More
Number of elements less than or equal to a given number in a given subarray in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 05:10:35
You are given a number and subarray lower and upper bound indexes. You need to count a number of elements that are less than or equal to the given number. Let's see an example.Inputarr = [1, 2, 3, 4, 5, 6, 7, 8] k = 4 lower = 0 upper ...
Read More
Number of elements greater than modified mean in matrix in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 05:07:45
The modified mean of the matrix is defined as follows...(sum(row-wise min) + sum(column-wise max)) / (row_size + column_size)Let's see an example.1 2 3 4 5 6 7 8 9mean = (sum(1 + 4 + 7) + sum(7 + 8 + 9)) / (3 + 3)We have to find the mean ...
Read More
Number of digits to be removed to make a number divisible by 3 in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 05:04:03
You are given a number in string. You need to find how many digits need to be removed to make it divisible by 3.We make a number divisible by removing at most 2 digits. So, the maximum number of digits to be removed to make it divisible by 3 is ...
Read More
Number of digits in the nth number made of given four digits in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 05:01:15
We need to find the number of digits in the nth number made of given four digits 1, 2, 3, and 4.The series with the above four digits is as follows1, 2, 3, 4, 11, 12, 13, 14, 21, 22, 23, 24...We need to find the number of digits of ...
Read More
Number of Digits in a^b in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:59:21
The power of a number can be computed using the iterative multiplication or function that the language provides. It's a straightforward thing.Here, we have to find the a raised to power b. And the number of digits in the result. Let's see some examples.Inputa = 5 b = 2Output2 Inputa ...
Read More
Number of digits in 2 raised to power n in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:57:34
The power of a number can be computed using the iterative multiplication or function that the language provides. It's a straightforward thing.Here, we have to find the 2 raised to power n. And the number of digits in the result. Let's see some examples.Input5Output2Input10Output4 AlgorithmInitialise the number n.Find the value ...
Read More
Number of arrays of size N whose elements are positive integers and sum is K in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:52:27
We are given two numbers n and k. We need to find the count of arrays that can be formed using the n numbers whose sum is k.The number of arrays of size N with sum K is $\dbinom{k - 1}{n - 1}$.This a straightforward formula to find the number ...
Read More
Number of anomalies in an array in C++
C++
Server Side Programming
Programming
Hafeezul Kareem
Published on 03-Jul-2021 04:49:07
In this tutorial, we are going to write a program that finds the number of anomalies in the given array.A number is an anomaly in the given array if the absolute difference between the number and all other numbers is greater than the given number k. Let's see an example.Inputarr ...
Read More
Previous
1
2
3
4
5
6
7
...
39
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout