Nishu Kumari has Published 122 Articles

C++ Program to Implement Doubly Linked List

Nishu Kumari

Nishu Kumari

Updated on 26-Aug-2025 19:00:20

39K+ Views

A Doubly Linked List is a data structure made up of nodes created using self-referential structures. Each node contains three parts, namely the data, a pointer to the next node, and a pointer to the previous node. Also, the doubly linked list can be traversed in both forward and ... Read More

C++ Programs To Create Pyramid and Pattern

Nishu Kumari

Nishu Kumari

Updated on 21-Aug-2025 18:15:52

2K+ Views

In this article, we will show you how to write C++ programs to create different pyramids and patterns. You can create many kinds of patterns using stars, numbers, and alphabets. Below is the list of patterns we will cover in this article- Simple ... Read More

Write a program in C++ to find the maximum and second maximum in a given unsorted array of integers

Nishu Kumari

Nishu Kumari

Updated on 20-Aug-2025 17:22:31

4K+ Views

We are given an array of unsorted integers of size N. The task is to find the distinct maximum and second maximum elements which are present in the array. The array may contain duplicate elements also, so we have to find only distinct elements. If there is no second ... Read More

Write a program in C++ to check if a string can be obtained by rotating another string by two places

Nishu Kumari

Nishu Kumari

Updated on 20-Aug-2025 17:21:04

496 Views

We are given two strings, a and b and the task is to find whether we can obtain the string b by rotating string a exactly two places in either an anticlockwise (left) or clockwise (right) direction. Let's take an example scenario to understand the problem clearly — Scenario ... Read More

Write a program in C++ to find the missing positive number in a given array of unsorted integers

Nishu Kumari

Nishu Kumari

Updated on 20-Aug-2025 17:19:07

468 Views

We are given an array of unsorted integers, and the task is to find the missing positive integer. The given array may contain negative numbers, zeros, and duplicate values, all in any random order. Let's look at some example scenarios to understand the problem clearly- Scenario 1- Input: ... Read More

How to find the maximum element of a Vector using STL in C++?

Nishu Kumari

Nishu Kumari

Updated on 19-Aug-2025 17:15:15

7K+ Views

A vector in C++ is a dynamic array that stores elements of the same data type and can change its size when needed. In this article, we are given a vector and our goal is to find the maximum (largest) element using different STL methods in C++. Let's ... Read More

C++ Program to Find the Frequency of a Character in a String

Nishu Kumari

Nishu Kumari

Updated on 19-Aug-2025 17:13:23

18K+ Views

A string is a sequence of characters like letters, numbers, symbols, or anything enclosed in double quotes (e.g., "Hello"). Our goal is to find the frequency of a character in a given string, which means counting how many times that specific character appears in the string. Let's look at ... Read More

C++ Program to Find GCD of Two Numbers Using Recursive Euclid Algorithm

Nishu Kumari

Nishu Kumari

Updated on 18-Aug-2025 18:44:02

6K+ Views

The Greatest Common Divisor (GCD) of two numbers is the largest number that divides both of them. In this article we'll show you how to write a C++ program to find the GCD of two numbers using the recursive Euclid's algorithm. For example: Let's say we have two numbers ... Read More

Write a program in C++ to count the Number of substrings that starts with ‘1’ and ends with ‘1’

Nishu Kumari

Nishu Kumari

Updated on 08-Aug-2025 10:33:58

501 Views

We are given the length of a binary string str and the string itself. The task is to count the number of substrings that start with '1' and end with '1'. A binary string contains only '0's and '1's, and a substring is any continuous part of the given string. ... Read More

An in-place algorithm for String Transformation in C++

Nishu Kumari

Nishu Kumari

Updated on 06-Aug-2025 16:18:30

187 Views

We are given a string and need to move all characters at even positions to the end of the string while maintaining the original order of both even-positioned and odd-positioned characters. The transformation should be done in-place (without using extra space) and in O(n) time. Let's look at a ... Read More

1 2 3 4 5 ... 13 Next
Advertisements