
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Found 7197 Articles for C++

160 Views
The expression "K-length subarrays" pertains to successive subarrays having precisely K elements. Grasping and working with subarrays is crucial for resolving various issues in fields such as dynamic programming, computational geometry, and data analysis. Another vital concept in array manipulation and statistics is the median. The median of an array represents the middle value when the elements are sorted in ascending order. In the case of an even number of elements, the median is the average of the two central values. The median constitutes a durable measure of central tendency, as it is less vulnerable to extreme values or outliers ... Read More

142 Views
When engaged in computer programming, it is sometimes necessary to locate the minimum weight of a subtree that originates from a specific node, with the condition that the subtree must not contain any nodes farther than D units away from the specified node. This problem arises in various fields and applications, including graph theory, tree-based algorithms, and network optimization. The subtree constitutes a subset of a larger tree structure, with the specified node serving as the root of the subtree. The subtree encompasses all the descendants of the root node and their connecting edges. The weight of a node refers ... Read More

177 Views
A foremost series summation array is an assemblage that accumulates the sum of interlacing elements up to an express index. It is a widely utilized tactic in the reconfiguration of assemblages to refine time complexity. Fenwick Tree, also recognized as Binary Indexed Tree (BIT), is a form of database that proficiently modernizes components and computes a preceding series summation in logarithmic time complexity. Within this article, we shall confer on how to disclose the lesser extreme boundary of a given value, referred to as K, from a series summation array with modernizations utilizing Fenwick Tree in C++. Syntax The ... Read More

341 Views
Graph theory encompasses the study of connected components, which are subgraphs in an undirected graph where every pair of vertices is linked by a path, and no other vertices are connected to it. In this article, we will delve into the utilization of the C/C++ programming language to determine if two vertices, X and Y, belong to the same connected component in an undirected graph. We will elucidate the syntax and rationale of the method before elucidating at least two diverse approaches to tackle this problem. Furthermore, we will provide concrete code examples and their corresponding outcomes for each ... Read More

123 Views
A matrix can be thought of as a collection of cells organized in rows and columns. Each cell can contain a value, which can be either empty or non-empty. In computer programming, matrices are commonly used to represent data in a two-dimensional grid. In this article, we will discuss how to efficiently count the number of connected non-empty cells in a matrix, taking into account possible updates to the matrix. We will explore different approaches to solve this problem and provide real code examples to demonstrate the implementation. Syntax The basic syntax for querying the count of connected non-empty cells ... Read More

662 Views
The strtok() function is one of the most utilised functions in C++. Using a delimiter as a guide, this function can divide a text into smaller chunks or tokens. It is simple to work with strings in C++ thanks to the strtok() function. The strtok() function will be thoroughly examined in this article, along with its definition, syntax, algorithm, and various implementation strategies. It is crucial to remember that the strtok function has several restrictions and potential downsides. It cannot be used on const or read-only strings, for instance, because it changes the original string in place. Edge situations and ... Read More

120 Views
The problem "Minimum removals to make a string concatenation of a substring of 0s" deals with the job of manipulating strings. A string of 0s and 1s is provided as input, and the result is an integer that reflects the minimal number of 0s that must be eliminated in order to produce a substring of consecutive 0s. In other words, the problem might be rephrased as follows: Given a string of 0s and 1s, how many 0s must be eliminated in order for the remainder of the string to include a substring of consecutive 0s. Algorithm Step 1: ... Read More

884 Views
Delimiters are the characters that separate a string from other characters, for example in a sentence in our normal day to day reading activity, we find out the different words because it is separated by spaces. We have () parenthesis as main delimiters in mathematical and regular expressions. The concept of substrings and their manipulation is very important in programming, especially in c which is a language used to write compilers and assemblers. The delimiters are identified in the string and the characters after the starting delimiter are copied into another variable, until the ending delimiter. The == ... Read More

201 Views
The challenge of finding the largest number not exceeding a given number N and not containing any of the digits in a string S is a problem that involves string manipulation and number theory. The goal is to determine the greatest possible number that is less than or equal to N while also excluding all of the digits found in the string S. For instance, consider a scenario where N is equal to 1000 and S is equal to "42". In this scenario, the largest number not exceeding N and not containing any of the digits in S would be ... Read More

3K+ Views
STL basically stands for Standard Template Library, which is a collection of pre-written code frequently used in Data structures and Algorithms. It was developed in the early 1990s by Meng Lee and Alexander Stepanov. It consists of mainly three components known as containers, algorithms and iterators. Containers are objects that stores and manipulate data such as list, vector, set, map and stack. Algorithm are functions which works on the data stored in the containers such as searching, sorting and also manipulating data. Iterators are object that navigates through the elements of a container easily. STL has became an ... Read More