Nishu Kumari has Published 122 Articles

Difference Between Private and Protected in C++

Nishu Kumari

Nishu Kumari

Updated on 03-Mar-2025 13:16:34

1K+ Views

In this article, we'll explain the difference between private and protected access specifiers in C++. Access specifiers in C++ control who can access the variables and functions inside a class. Two commonly used specifiers are private and protected. Private members are accessible only within the class, while protected members can ... Read More

Difference Between Insertion Sort and Selection Sort

Nishu Kumari

Nishu Kumari

Updated on 03-Mar-2025 13:16:17

3K+ Views

In this article, we will explain the difference between Insertion Sort and Selection Sort. These are two basic sorting algorithms used to arrange numbers in order. We will look at how they work, how fast they are, and when to use each one. By the end, you'll have a clear ... Read More

Descending order in Map and Multimap of C++ STL

Nishu Kumari

Nishu Kumari

Updated on 30-Jan-2025 14:47:12

4K+ Views

Generally, the default behavior of map and multimap map is to store elements is in ascending order. But we can store element in descending order by using the greater function. Map in Descending Order We use a map to store elements in descending order with the help of the ... Read More

Sorting a vector in C++

Nishu Kumari

Nishu Kumari

Updated on 30-Jan-2025 14:46:25

19K+ Views

Sorting a vector in C++ means arranging its elements in a specific order, like ascending or descending. This is a common task when you need to organize data efficiently. C++ provides different ways to sort a vector. In this article, we will look at different ways to sort a vector ... Read More

Ways to copy a vector in C++

Nishu Kumari

Nishu Kumari

Updated on 30-Jan-2025 14:45:41

13K+ Views

In C++, vectors are commonly used to store dynamic collections of data. Sometimes, we need to copy a vector to manipulate data without affecting the original. In this article, we'll show you the easiest ways to copy a vector in C++, along with examples to show you how it works. ... Read More

C++ Program to Implement Singly Linked List

Nishu Kumari

Nishu Kumari

Updated on 30-Jan-2025 14:41:59

90K+ Views

A singly linked list is a type of data structure where each item (called a node) has two parts: the data and a link to the next node in the list. You start from the first node (called the head) and keep going until the link is empty (NULL). For ... Read More

How to reverse a Vector using STL in C++?

Nishu Kumari

Nishu Kumari

Updated on 30-Jan-2025 14:41:48

797 Views

Reversing a vector's elements is a common task in many programs, whether for sorting, displaying, or other reasons. C++ provides several ways to reverse a vector. Following is an example of creating a vector using C++. For the vector: V = {1, 2, 3, 4, 5} Reversed Output: {5, 4, ... Read More

SQL Query to Find the Highest Salary of Each Department

Nishu Kumari

Nishu Kumari

Updated on 17-Jan-2025 12:08:08

147 Views

SQL (Structured Query Language) is a programming language used to manage and interact with databases. In this case, the goal is to find the highest salary in each department from a table that contains employee data, including their salaries and the departments they work in. We'll write an SQL ... Read More

SQL Query for Matching Multiple Values in the Same Column

Nishu Kumari

Nishu Kumari

Updated on 17-Jan-2025 12:07:30

286 Views

To query data in SQL where you need to match multiple values within the same column, you can use operators like IN and OR. For example, how would you find employees in the "Sales" or "Marketing" departments, or list those with job titles like "Manager" or "Salesperson"? These are common ... Read More

How to Select Data Between Two Dates and Times in SQL Server?

Nishu Kumari

Nishu Kumari

Updated on 17-Jan-2025 12:04:46

116 Views

Sometimes, you need to get data from SQL Server that falls between two specific dates or times, like finding all orders placed within a week or all activities that happened during a certain time frame. Writing the right query can be challenging if you're not familiar with how to filter ... Read More

Advertisements