Eva Sharma has Published 18 Articles

Permutations and Combinations (Concept, Examples, C++ Program)

Eva Sharma

Eva Sharma

Updated on 24-Aug-2023 18:27:49

282 Views

Permutations and Combinations refer to the arrangements of objects in mathematics. Permutation − In permutation, the order matters. Hence, the arrangement of the objects in a particular order is called a permutation. Permutations are of two types − Permutation with repetition Suppose we have to make a three-digit code. Some ... Read More

HCF of an array of fractions (or rational numbers)

Eva Sharma

Eva Sharma

Updated on 24-Aug-2023 18:26:00

171 Views

HCF or the Highest common factor of two or more numbers refers to the highest number which divides them. A rational number is the quotient p/q of two numbers such that q is not equal to 0. Problem Statement Given an array with fractional numbers, find the HCF of the ... Read More

Stella Octangula Number

Eva Sharma

Eva Sharma

Updated on 24-Aug-2023 18:19:51

64 Views

In mathematics, a Stella Octangula number is a figurate number based on the Stella Octangula, of the form n(2n2 − 1). Stella Octangula numbers which are perfect squares are 1 and 9653449. Problem Statement Given a number n, check whether it is the Stella Octangula number or not. The sequence ... Read More

Nicomachus’ Theorem

Eva Sharma

Eva Sharma

Updated on 24-Aug-2023 18:17:20

140 Views

According to Nicomachus’ Theorem, the sum of the cubes of the first n integers is equal to the square of the nth triangular number. Or, we can also say − The sum of cubes of first n natural numbers is equal to square of sum of first natural numbers. ... Read More

Equal sum array partition excluding a given element

Eva Sharma

Eva Sharma

Updated on 24-Aug-2023 18:00:27

67 Views

Problem Statement For an index and an arr[]. Check if the array[] can be partitioned into two disjoint sets, excluding arr[index] such that the sum of both sets has equal value. Example 1 Input arr[] = {4, 3, 1, 2}, Index = 1 Output No Explanation We ... Read More

Squared Triangular Number (Sum of Cubes)

Eva Sharma

Eva Sharma

Updated on 24-Aug-2023 17:58:22

48 Views

A square triangular number, also referred to as a triangular square number, is a number that is both a triangular number and a perfect square. Square triangular numbers have an unlimited number of possible values; the first few are − 0, 1, 36, 1225, 41616... A triangular ... Read More

XOR of two numbers after making the length of their binary representations equal

Eva Sharma

Eva Sharma

Updated on 16-Aug-2023 11:00:13

127 Views

XOR, or exclusive OR, is a boolean logic operation which is used in generating parity bits for error checking, fault tolerance, etc. Various symbols are used to represent this operation: ^, ⊕, ⊻, etc. XOR Logic The XOR operation is only true if the two arguments are different. This means ... Read More

The time when the minute hand and the hour hand coincide after a given hour

Eva Sharma

Eva Sharma

Updated on 16-Aug-2023 10:57:39

172 Views

When the minute hand moves from 12 to 12 in one hour, the hour hand also moves from the previous hour to the next. Hence, every hour, the minute hand and the hour hand coincide once. Problem Statement Given an input hour, find the time in minutes when the hour ... Read More

Sum of the series 5+55+555+.. up to n terms

Eva Sharma

Eva Sharma

Updated on 16-Aug-2023 10:56:05

254 Views

5, 55, 555, ... is a series that can be derived from geometric progression and, thus, computed with the help of GP formulae. Geometric progression is a type of series in which each succeeding term is the product of some specific term (ratio) with the preceding term. We will utilize ... Read More

Sum of products of all combinations taken (1 to n) at a time

Eva Sharma

Eva Sharma

Updated on 16-Aug-2023 10:54:45

90 Views

There can be multiple combinations of numbers if taken 1 to n at a time. For example, if we take one number at a time, the number of combinations will be nC1. If we take two numbers at a time, the number of combinations will be nC2. Hence, the total ... Read More

Advertisements