## Value of k-th index of a series formed by append and insert MEX in middle Vaishnavi Tripathi

Updated on 05-Oct-2023 11:58:31

23 Views

In this article, we will learn about Mex and will also generate the C++ code that returns the kth index of the series so formed by using append and MEX (>0) operations on the given sequence. The roadmap of the operations to be performed is given below − Start with ... Read More

## Sum of series (n/1) + (n/2) + (n/3) + (n/4) +……. + (n/n) Vaishnavi Tripathi

Updated on 05-Oct-2023 11:57:51

57 Views

This this article, we will discuss the different approaches to calculate the sum of the given series. Problem Statement We are given a number and our task is to calculate the sum of the series Σ (n / i) for I =0 to i=n. We are given any given value ... Read More

## Stable sort for descending order Vaishnavi Tripathi

Updated on 05-Oct-2023 11:55:41

56 Views

In this article, we will discuss what is meant by stable sorting and how can we sort an array in descending order keeping in mind that the sorting algorithm should be stable. Let us first discuss about what are the features of a stable sort algorithm − A sorting algorithm ... Read More

## Ropes left after every removal of smallest rope Vaishnavi Tripathi

Updated on 05-Oct-2023 11:49:33

34 Views

In this article, we will discuss two approaches to solve the problem - Ropes left after every removal of smallest rope. Problem Statement We are given an array of elements where array [i] denotes the length of the ith rope in the array. Our task is to cut a length ... Read More

## Minimum sum of multiplications of n numbers Vaishnavi Tripathi

Updated on 05-Oct-2023 11:46:23

35 Views

In this article, we will discuss two approaches to generate the desired sum. Both the approaches are dynamic programming-based approaches. In the first approach, we will memorization for dynamic programming and then we will apply the same approach for tabulation in order to avoid the use of extra stack space ... Read More

## Minimum number of subtract operation to make an array decreasing Vaishnavi Tripathi

Updated on 05-Oct-2023 11:44:55

41 Views

In this article, we will work upon sorting an array in decreasing order by applying some subtraction operations on it. Problem Statement We are given an array containing a series of n numbers from array, array, . . . . , array[ n-1 ]. We are also given an integer ... Read More

## Maximum in array which is at-least twice of other elements Vaishnavi Tripathi

Updated on 05-Oct-2023 11:42:11

34 Views

In this article, we will discuss different approaches to point out the greatest element in the array which is at least twice of all the other elements in the same array. Problem Statement An array of n different elements is given to us, we have to find out the maximum ... Read More

## Largest number that is not a perfect square Vaishnavi Tripathi

Updated on 05-Oct-2023 11:34:32

33 Views

In this article, we will discuss two different approaches to find out the largest number smaller than a given number which is not a perfect square. In the first approach, we will run a loop to check for every number until we find the desired number while in the second ... Read More

## k smallest elements in same order using O(1) extra space Vaishnavi Tripathi

Updated on 05-Oct-2023 11:32:10

32 Views

We have an array "nums" consisting of "size" elements and an integer "number" denoting the number of smallest elements we have to return. Our task is to find out the "number" smallest elements from the given array. The order of the elements should be preserved and we are not allowed ... Read More

## Fibonomial coefficient and Fibonomial triangle Vaishnavi Tripathi

Updated on 05-Oct-2023 11:29:12

35 Views

In this article, we will discuss about a special type of number called fibonomial coefficient and how does a fibonomial triangle looks like. We will also discuss the C++ code approach to print a fibonomial triangle with a given height. Let us first discuss that what is a fibonomial coefficient. ... Read More