Found 7197 Articles for C++

C++ Program to Convert Minutes into Seconds

AYUSH MISHRA
Updated on 15-Nov-2024 14:57:38

8K+ Views

Minutes and seconds are time units commonly used in applications ranging from digital clocks to timekeeping in games and simulations. Converting minutes into seconds is a straightforward operation but essential in many time-sensitive applications. In this article, we will learn how to convert minutes to seconds using C++. Formula The formula to convert minutes to seconds is: seconds = minutes × 60 Examples Input 5 Output 300 Input 10 Output 600 Using Function We will write code that defines a function, convertMinutesToSeconds. This function will take the minutes as an input parameter for ... Read More

Check if a given String is palindrome using two pointer in C++

AYUSH MISHRA
Updated on 13-Nov-2024 16:48:04

14K+ Views

A palindrome is a word, phrase, number, or other sequence of characters that reads the same from both backward and forward sides. In strings, the palindrome strings are those strings that can be read the same from both left and right sides. In this article, we are going to learn how we can check if a given string is palindrome or not using the two-pointer technique in C++. Problem We are given a string, and we have to check if it is palindrome or not using the two-pointer method in C++. Example 1 ... Read More

Program to find Median if Mean and Mode are given of an array in C++

AYUSH MISHRA
Updated on 13-Nov-2024 16:45:24

12K+ Views

Mean, Median, and Mode are fundamental statistical measures that are used to describe the central tendency and also explain the spread of the sheet. These three measures help in understanding the overall distribution of the data. In this article, we are going to learn how to find the Median if we are given the Mean and Mode of an array in C++. Problem Statement We are given an array of numbers, and we need to calculate the Median, in case when Mean and Mode of an array are given in C++. Example Input [5, 15, 25, 35, ... Read More

Program to find Mean if Median and Mode are given of an array in C++

AYUSH MISHRA
Updated on 13-Nov-2024 17:55:16

9K+ Views

Mean, Median, and Mode are key statistical measures that help in describing a dataset's central tendency and distribution. These quantities help in understanding the central tendency and distribution of the given data. In this article, we will learn how to find the Mean if the Median and Mode of a given array are known in C++. Problem Statement We are given an array of numbers, and we need to find the mean if the median and mode are provided in C++. Example Input: [5, 15, 25, 35, 35, 40, ... Read More

Program to find Mode if Mean and Median are given of an array in C++

AYUSH MISHRA
Updated on 10-Nov-2024 13:49:04

16K+ Views

Mean, median and mode are three basic concepts of statistics. These quantities help in understanding the central tendency and distribution of given data. In this article we are going to learn, how we can find the Mode if the Mean and Median of a given array (which is the same as ungrouped data) in C++.  Problem statement We are given an array of numbers and we have to find the mode if mean and median are given in C++.  Example Input [5, 15, 25, 35, 35, 40, 10] Mean = 20Median = 25 Output 35 Brute Force Approach Mode is ... Read More

Clear bit ranges in given number in C++

Jiya Garg
Updated on 02-Sep-2024 17:33:55

306 Views

Given a number n, write C++ program to clear bits in the given range between l and r. Where, 1

Difference Between Vector and List

Shirjeel Yunus
Updated on 22-Jul-2024 11:34:04

1K+ Views

Vector and List are present in many programming languages like C++, R, etc. and they are used to add and remove elements. These elements can be accessed randomly in a vector but not in a list. In this article, we will discuss the difference between vector and list in C++. What is Vector in C++? A vector is a container which works as a dynamic array. It can be used to store elements whose datatype is same. Vectors also have a characteristic of growing or shrinking at runtime. Vectors belong to the Standard Template Library (STL) and header file ... Read More

Overview of the C++ Language Binding in the ODMG Standard

sudhir sharma
Updated on 22-Jan-2024 16:15:03

705 Views

Introduction Diving into the world of data management and modeling can be a complex task, especially when dealing with standards like the Object Data Management Group (ODMG). Did you know that ODMG provides an essential standard for object-oriented database systems, including a C++ language binding? This article will guide you through an easy-to-understand overview of this very aspect of ODMG, highlighting its key features such as ODL constructs and transactions. Overview of the ODMG Standard The ODMG standard, developed by the Object Data Management Group (ODMG), provides a framework for managing object-oriented databases. It includes the Object Definition Language (ODL) ... Read More

Number of palindromic subsequences of length k where k <= 3

Riya Kumari
Updated on 05-Jan-2024 16:11:39

368 Views

Palindromes are series of letters, numbers or characters which have same starting and ending point. Also, they are same when read from left to right and right to left. A subsequence of a string is a new string which is made by removing some of the characters from the original string without changing the relative order of the characters which are remaining. Suppose you are given a string of length N. You want to find palindromic subsequences of length K from the string. Note that value of K can be less than or equal to 3. In this article, we ... Read More

Number of palindromic paths in a matrix

Riya Kumari
Updated on 05-Jan-2024 16:10:04

378 Views

Palindromic pathways are very useful in solving various problems involving patterns and sequences. It can be used in finding correct path in a maze without reversing, palindromes in a sequence of letters, etc., It can also be used to identify symmetric patterns and structures. In this article, we will discuss about palindromic paths and ways to find such paths in a matrix using C++. Palindromes are series of letters, numbers or characters which have same starting and ending point. Also, they are same when read from left to right and right to left. A path in a matrix is a ... Read More

Previous 1 ... 4 5 6 7 8 ... 720 Next
Advertisements