- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sunidhi Bansal has Published 1100 Articles
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
346 Views
We are given string str. The goal is to count the number of substrings in str that have starting character same as character X and ending character same as character Y. For example, if input is “artact” and X=’a’ and Y=’t’, the substrings will be “art”, “act”, “artact”. The count ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
227 Views
We are given a string str. The goal is to count the number of substrings in str that have each character occurring utmost k times. For example if input is “abc” and k=1, the substrings will be “a”, “b”, “c”, “ab”, “bc”, “abc”.Let us understand with examples.Input − str=”abaefgf”Output − ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
420 Views
We are given a string str. The goal is to count the number of substrings in str that have the same starting and ending character. For example, if input is “baca” substrings will be “b”, “a”, “c”, “a”, “aca”. Total 5.Let us understand with examples.Input − str=”abaefgf”Output −Count of substrings ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
250 Views
We are given string str containing 0’s, 1’s, and 2’s only. The goal is to find all substrings of str that have equal numbers of 0’s 1’s and 2’s. If str is “12012”. Substrings with equal 0’s, 1’s, and 2’s will be “120”, “201” and “012”. The count will be ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
139 Views
We are given with two strings str_1 and str_2 as input. The goal is to find the count of strings same as str_2 that can be constructed using letters picked from str_1 from which each character is used just once.Note − All alphabets in both are in the same case.Let ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
219 Views
We are given a number N as input. The goal is to find all N digit numbers that have an odd number of 0’s as digits. The number also could have preceding zeros like in case of N=3 numbers included will be 000, 011, 012….990.Let us understand with examples.Input − ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
111 Views
We are given a number N as input. The goal is to find all N digit numbers that have an even number of 0’s as digits. The number also could have preceding zeros like in case of N=3 numbers included will be 001, 002, 003….010….so on.Let us understand with examples.Input ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
286 Views
We are given with a string of characters and the task is to calculate the count of pairs having both the elements as vowels. As we know there are five vowels in English alphabet i.e. a, i, e, o, u and other characters are known as Consonants.Input − string str ... Read More
![Sunidhi Bansal](https://www.tutorialspoint.com/assets/profiles/124656/profile/60_131452-1581053210.jpg)
Sunidhi Bansal
1K+ Views
We are given with an array of positive integer numbers and an integer variable k. The task is to calculate the count of the number of elements in an array which is divisible by the given value k.Input − int arr[] = {4, 2, 6, 1, 3, 8, 10, 9}, ... Read More