Sonal Meenu Singh has Published 52 Articles

What are different types of Tries?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 04-Oct-2023 08:17:51

2K+ Views

Introduction In this tutorial, we will understand different types of tries and their uses. Tries are tree-like data structures that are mostly used for operations like string searching. There are various types of trie and they are used as per the task requirement. Generally, trie tries are of three types: ... Read More

How to sort the string based on the number of matchsticks for representation?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 18:56:27

59 Views

Introduction In this tutorial, we implement an approach to sort a string on the basis of the number of matchsticks required for its representation. In this approach, we use N numbers of matchsticks and sort an array. The array can contain numbers, words, or both. Matchsticks are used to arrange ... Read More

How to alphabetically sort an array while converting numbers into words?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 18:54:31

87 Views

Introduction This tutorial deals with the problem of sorting an array alphabetically while each number is converted into words. To translate numbers into words means changing numbers to their number names. Like, 65 is sixty-five. Here, we consider a numerical array, convert all array elements to words and arrange them ... Read More

Range Update Queries to XOR with 1 in a Binary Array

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 18:52:33

90 Views

Introduction In this tutorial, we find an approach to find the range update Queries to XOR with 1 in a binary array. To implement the approach we use a binary array which is an array consisting of 0 and 1. The range update queries are the queries which are used ... Read More

Queries to search an element in an array and move it to front after every query

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 18:51:01

60 Views

Introduction In this tutorial, the task is to use queries to search for an element in an array. It is to push to the front after every query in C++. To implement this task, it takes an array A with elements from 1 to 5 and a query array Q ... Read More

How to Process strings using std::istringstream?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 18:48:22

1K+ Views

Introduction In this tutorial, we will learn about the istringstream and how to use it for processing strings. istringstream is an object of string class defined in the header file. It is used for reading from the stream strings. A stream is a flow of data (collection of characters) ... Read More

Longest subsequence with different adjacent characters

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 11:57:52

121 Views

Introduction In this tutorial, we implement an approach to find the longest subsequence with different adjacent characters. Here, the longest subsequence is a subsequence that contains the maximum number of string characters with different adjacent characters. To implement the approach to finding the longest subsequence, consider a string s, and ... Read More

How to validate image file extension using Regular Expression?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 10:53:07

1K+ Views

Introduction In this article, we check validate image file extension using regular expressions. Image file extension in this article, is the valid extension for an image file which consists of file name and file extension . The valid image file extension follows some rules which we define in this article. ... Read More

How to check Aadhaar number is valid or not using Regular Expression?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 10:41:26

3K+ Views

Introduction In this C++ tutorial, we check whether the input Aadhar number is valid using Regular Expression. Regular expression or regex is used for pattern matching in strings or string searching algorithms. Its functionalities are defined in the header file. It is used with a regex keyword followed by ... Read More

Defanged Version of Internet Protocol Address

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 03-Oct-2023 10:35:23

299 Views

Introduction This tutorial deals with the problem of finding the defanged version of the Internet Protocol Address. The Internet Protocol Address or IP Address is an individual numerical address of a device connected to or using the Internet. It is unique for every internet-connected device. It consists of numbers separated ... Read More

Advertisements