Way2Class has Published 221 Articles

Count K-length subarrays whose average exceeds the median of the given array

Way2Class

Way2Class

Updated on 21-Jul-2023 17:20:50

66 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 ... Read More

Queries to find the Minimum Weight from a Subtree of atmost D-distant Nodes from Node X

Way2Class

Way2Class

Updated on 21-Jul-2023 17:16:23

53 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 ... Read More

Queries to find the Lower Bound of K from Prefix Sum Array with updates using Fenwick Tree

Way2Class

Way2Class

Updated on 21-Jul-2023 17:13:16

99 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 ... Read More

Queries to check if vertices X and Y are in the same Connected Component of an Undirected Graph

Way2Class

Way2Class

Updated on 21-Jul-2023 17:00:04

169 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 ... Read More

Queries to find the count of connected Non-Empty Cells in a Matrix with update

Way2Class

Way2Class

Updated on 21-Jul-2023 15:57:07

56 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 ... Read More

Implementing of strtok() function in C++

Way2Class

Way2Class

Updated on 21-Jul-2023 13:48:33

338 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 ... Read More

Minimum removals to make a string concatenation of a substring of 0s followed by a substring of 1s

Way2Class

Way2Class

Updated on 21-Jul-2023 13:46:36

55 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 ... Read More

Extract substrings between any pair of delimiters

Way2Class

Way2Class

Updated on 20-Jul-2023 19:02:40

514 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. ... Read More

Largest number not exceeding N that does not contain any of the digits of S

Way2Class

Way2Class

Updated on 20-Jul-2023 18:48:49

91 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 ... Read More

Remove all the occurrences of a character from a string using STL

Way2Class

Way2Class

Updated on 20-Jul-2023 18:45:13

2K+ 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 ... Read More

Advertisements