- 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
Found 1862 Articles for Data Structure
![Sonal Meenu Singh](https://www.tutorialspoint.com/assets/profiles/605896/profile/60_1123519-1677042019.jpeg)
134 Views
Introduction In this tutorial, we will see queries to check if string B exists as a substring of string A. A substring is a string that is part of the main string. In the Query array, there are some integer values, and the index of string A will be checked to see if those integer values match the substring B or not.We use C++ queries to find out whether B is a substring of A or not.In this approach, there is a string A and B is the substring of A. Queries in C++ are integer values represented in array ... Read More
![Sonal Meenu Singh](https://www.tutorialspoint.com/assets/profiles/605896/profile/60_1123519-1677042019.jpeg)
288 Views
Introduction In this tutorial, we will learn the concept of c++ to find the sum of ASCII values of the characters present in the prime position. Prime position means characters whose position is 2, 3, 5, or any other prime number. ASCII (American Standard Code for Information Interchange) values are unique numerical values for alphabets, letters, punctuation marks, and other characters used in coding. It is used for communication with computers as the computer does not understand human language. There are 128 ASCII values starting from 0 to 127. Capital and small alphabets have separate ASCII values. We will develop ... Read More
![Sonal Meenu Singh](https://www.tutorialspoint.com/assets/profiles/605896/profile/60_1123519-1677042019.jpeg)
69 Views
Introduction In this tutorial, we develop an approach to finding the maximum length odd parity substring. Odd parity in a substring means the number of times 1 repeats in a string is odd. Parity in C++ defines the bit set number and is 1s in a number. There are two types of parity: even and odd. When the total number of “1” in a binary representation is odd it is known as an odd parity string. In this tutorial, we find the maximum length odd parity substring using C++ programming concepts. Implementation 1 String = 101100 Output = 6 ... Read More
![Sonal Meenu Singh](https://www.tutorialspoint.com/assets/profiles/605896/profile/60_1123519-1677042019.jpeg)
330 Views
Introduction In this tutorial, we discuss an approach to finding all possible palindrome substrings using the input string. To implement the approach for this task we use C++ programming language and its functions. A palindrome is a string that reads the same from the back and front. For example, Mom is a palindrome string. In this tutorial, we take a string and find all possible palindrome substrings from it. Example 1 String = abcaa Output The possible palindromic substrings are : a, b, c, aa, aaa, aba, and aca. In the above example, the input string can make ... Read More
![Sonal Meenu Singh](https://www.tutorialspoint.com/assets/profiles/605896/profile/60_1123519-1677042019.jpeg)
85 Views
In this tutorial, we learn how to count the character pair in a string whose ASCII value is the difference of K. K is any difference value, it can be either 1 or 0. Create a C++ code to count such character pairs in an input string S. We used the size() method of the String class Syntax size() = It is a String class method. It is an empty parameter library method. It returns the size of the string in terms of bytes. string_name.size() Example = s.size() ASCII values are predefined values for characters, symbols, ... Read More
![Sonal Meenu Singh](https://www.tutorialspoint.com/assets/profiles/605896/profile/60_1123519-1677042019.jpeg)
93 Views
Introduction In this tutorial, we will elaborate an approach for finding three non-overlapping substrings from a given string s, and when all substrings are combined together they form a palindrome. To solve this task we use the string class features of the C++ programming language. Palindrome in a string means the string reads the same in both forward and backward directions. The palindrome string example is Madam. Suppose there is a string "s" and the substrings are a, b, and c. When you combine a, b, and c, they form a palindrome string. Here is an example to understand the ... Read More
![Mallika Gupta](https://www.tutorialspoint.com/assets/profiles/616724/profile/60_2138235-1678687177.jpg)
708 Views
Introduction A C++ string is contiguous storage of alphanumeric characters as well as special characters. A string has the following properties − Every C++ string is associated with a fixed length. Character operations can be easily performed with the string characters. A string is composed of words, which are space separated. In this article, we are going to develop a code that takes as input a string, and displays the last character of each word in the string. Let us look at the following example to understand the topic better − Sample Example Example 1 − str − ... Read More
![Mallika Gupta](https://www.tutorialspoint.com/assets/profiles/616724/profile/60_2138235-1678687177.jpg)
31 Views
Introduction A stream of characters flowing together collectively comprising of alphanumeric characters as well as special symbols can be termed as a C++ string. String concatenation is an important aspect of the string data structure, since it is used to combine different sub strings or words to form complete sentences. Concatenation in C++ can be simply done using the + operator. In this article, we are going to develop a code that takes as input an array of string, and then analyses each pair to see if that pair contains all the letters of the word “string” . Let us ... Read More
![Mallika Gupta](https://www.tutorialspoint.com/assets/profiles/616724/profile/60_2138235-1678687177.jpg)
758 Views
Introduction C++ strings are essentially a combination of words used as a storage unit to contain alphanumeric data. The words in a string are associated with the following properties − The word positions begin with 0. Every word is associated with a different length. The characters combine together to form words, which eventually form sentences. By default, the words are separated by a space character. Every word contains at least one character. In this article, we are going to develop a code that takes as input a string, and displays the last character of each word in ... Read More
![Mallika Gupta](https://www.tutorialspoint.com/assets/profiles/616724/profile/60_2138235-1678687177.jpg)
58 Views
Introduction A contiguous sequence of characters, comprising of upper case, lower case, repetitive or unique alphanumeric characters form a C++ string. Every string is recognized by a unique length parameter, which may be odd or even in nature. A palindromic string is the same sequence of characters encountered from both the beginning as well as the end. The characters at equivalent positions from start and end do not differ. They may be even length or odd length palindromes. The odd length palindrome has a middle character separating the two equivalent halves. In this article, we are going to develop a ... Read More