- 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 7346 Articles for C++
![Prabhdeep Singh](https://www.tutorialspoint.com/assets/profiles/546958/profile/60_1428686-1667456005.jpg)
131 Views
A subsequence of a string means part of a string in which characters can be taken from anywhere of the string (zero or more elements) without changing the order of the characters and forming a new string. In this problem, we have given a string of length N where every character of the string belongs to either ‘A’, ‘B’, or ‘C’ character. Our task is to find that the string can be split only into subsequences “ABC” or Not. If the string is split only into subsequences “ABC” then return “yes” otherwise return “no”. Input 1: str = “AABCBC” ... Read More
![Prabhdeep Singh](https://www.tutorialspoint.com/assets/profiles/546958/profile/60_1428686-1667456005.jpg)
296 Views
A binary string is a string that consists of only two different types of characters and that is ‘0’ and ‘1’, hare base is 2. And a decimal representation means each digit is lie between ‘0’ to ‘9’, here the base is 10. Here we have given a string of binary numbers and an integer k. we have to check if the decimal representation of the given binary string is divisible by k or not. If it is divisible then we have to return ‘yes’ otherwise return ‘no’. In the conversion of binary to decimal, we convert a base 2 ... Read More
![Prabhdeep Singh](https://www.tutorialspoint.com/assets/profiles/546958/profile/60_1428686-1667456005.jpg)
129 Views
We will be given an array and have to choose an element from it and add that element to the sum. After adding that element to the sum, we have to remove three elements from the array if they exist current number, current number -1, and current number + 1. By this method we will make the array empty and will get a sum. At the end, we have to make the sum maximum. Input: [ 1, 2, 3] Output: 4 Explanation At first, we can have three moves, delete 1, 2, or 3. Let ... Read More
![Tapas Kumar Ghosh](https://www.tutorialspoint.com/assets/profiles/641996/profile/60_877006-1681905500.jpg)
180 Views
In C++, the trie has an advanced data structure that is used for storing the collection of trees. The word tries came from the word retrieval and it is known as a digital tree or prefix tree. Let’s take an example of all possible joint by taking a given list of strings. We are defining the string input as {“tutor”, “true”, “tuo”} We can observe that the different string of characters is connected to the single string of the character. So here t and u are the list of characters in the string that joints all possible strings. In ... Read More
![Tapas Kumar Ghosh](https://www.tutorialspoint.com/assets/profiles/641996/profile/60_877006-1681905500.jpg)
117 Views
In C++ we have a predefined function sqrt that returns the square root of any number. The Rotating Caliper’s Method is the technique used to solve the algorithmic or computational geometry. Visual Representation of Rotating Caliper’s MethodThe hand rotation shows the real example of a rotating caliper graph, whenever the hand rotates the perpendicular direction is shown. We can also understand this concept by using a polygon shape. In this article, we are going to find the maximum distance of two coordinate points using Rotating Caliper’s Method. Syntax The following syntax used in the program − vector name ... Read More
![Devang Delvadiya](https://www.tutorialspoint.com/assets/profiles/570828/profile/60_2508000-1671165075.jpg)
221 Views
Machine Learning ML is the investigation of PC calculations that learn without being unequivocally modified by people. They accomplish this by ingesting and preparing information, which assists them with recognizing examples and patterns. ML is generally pertinent in healthcare, marketing, medical services, logistics, human resources, energy, protection, e-commerce, manufacturing, art & creativity, finance, transportation, automobile, government & surveillance, insurance, and digital media and entertainment. Huge corporate goliaths like Apple, Google, Microsoft, IBM, and to a greater extent, use ML. In addition to the tech monsters, however little and mid-sized new companies likewise depend on ML. Most tech organizations use AI ... Read More
![Sakshi Koshta](https://www.tutorialspoint.com/assets/profiles/652652/profile/60_3316011-1683712915.jpeg)
282 Views
The longest common prefix problem is a well-known computer science problem that is frequently encountered when working with strings or lists. It entails determining the string or list element with the longest common prefix. When it comes to linked lists, there are several approaches that can be taken. One common approach is to traverse the linked list and compare the characters of each node in the list until a mismatch is found. The longest common prefix up to the point of mismatch is considered. Linked List A linear linked list can be defined as a collection of variable number of ... Read More
![Sakshi Koshta](https://www.tutorialspoint.com/assets/profiles/652652/profile/60_3316011-1683712915.jpeg)
98 Views
The evaluation of all equation in an interval [L, R] give us a range of values for those variables. Examples of how this may be used include modelling, data analysis, and problem-solving scenarios. In this situation, we define equations variable values for all point in range. Hence can be done by specifying the step size of the range and evaluating the equation for each variable value inside the range. Specifications It may be called a request for information asked to database. Data is extracted using specific commands when certain requirements are met. To acquire, filter, sort, and summarize data from ... Read More
![Sakshi Koshta](https://www.tutorialspoint.com/assets/profiles/652652/profile/60_3316011-1683712915.jpeg)
163 Views
What are the Specifications of Using String? To solve a specific challenge involving the given string S. The string S contains only lowercase English letters, and certain constraints must be followed while removing characters. The given constraints are − There are lowercase English letters in string S. A character can only be deleted if it appears more than once in string. Only characters that appear consecutively can be deleted. The following steps can be used to remove characters from string S − Find all characters that appear more than once as you iterate over string S. Find all of ... Read More
![Sakshi Koshta](https://www.tutorialspoint.com/assets/profiles/652652/profile/60_3316011-1683712915.jpeg)
75 Views
String manipulation-related concepts like The Sum of indices of Characters deleted to obtain an Empty String are frequently utilized in programming challenges and competitions. The result is then computed using the sum of the eliminated characters' indexes. The Sum of indices of Characters deleted to obtain an Empty String is a practical idea in string manipulation that may be used to solve a variety of programming difficulties and challenges. Problem Approach We must first comprehend the problem statement and given criteria to find total of character indices eliminated to produce empty string. Given string S, the objective is to determine ... Read More