Sonal Meenu Singh has Published 52 Articles

Repeated Character Whose First Appearance is Leftmost

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 01-Aug-2023 09:41:45

115 Views

Introduction In this tutorial, we will develop an approach to finding repeated characters in a string whose first appearance is leftmost. This means the character first appeared at the beginning of the string. To find out whether the first character repeats or not, we traverse the whole string and match ... Read More

Queries to check if string B exists as a substring in string A

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 01-Aug-2023 09:38:52

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

Find the sum of the ascii values of characters which are present at prime positions

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 01-Aug-2023 09:34:50

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

Find max length odd parity substring

Sonal Meenu Singh

Sonal Meenu Singh

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

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

Distinct palindromic sub-strings of the given string using Dynamic Programming

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 31-Jul-2023 19:57:39

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

Count pairs of characters in a string whose ASCII value difference is K

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 31-Jul-2023 19:50:15

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

Count of three non-overlapping substrings which on concatenation forms a palindrome

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 31-Jul-2023 19:48:53

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

Count occurrence of a given character in a string using Stream API in Java

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 31-Jul-2023 19:47:33

5K+ Views

Introduction In this tutorial, we will implement an approach that counts how many times a particular character appears in a string using the Stream API in Java. A string is a collection of characters and we will use a String class method to separate string characters. We will take an ... Read More

Why can’t a Priority Queue wrap around like an ordinary Queue?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 22-Feb-2023 16:09:59

236 Views

Introduction A queue is an abstract Data type that inserts elements from the Rear end and removes them from the Front end. There are three types of queues: Simple Queue, Priority Queue, and Circular Queue. In this tutorial, we understand why we cannot wrap around a Priority queue and the ... Read More

What is an in-memory Queue in Data Structures?

Sonal Meenu Singh

Sonal Meenu Singh

Updated on 22-Feb-2023 16:01:18

1K+ Views

Introduction In this tutorial, we will learn about the in-memory queue in the data structure. A queue is a general data structure that inserts and removes elements with some pattern. It uses the First In First Out approach for its processing. An array and linked lists are used to implement ... Read More

Advertisements