Find the point where a monotonically increasing function becomes positive first time

Problem Statement In the “Find the point where a monotonically increasing function becomes positive first time” we have given a function “int f(unsigned int x)” which takes a non-negative integer ‘x’ as input and returns an integer as output. The function is monotonically increasing with respect to the value of x, i.e., the …

Read more

Maximum Subarray Sum using Divide and Conquer

Problem Statement In the “Maximum Subarray Sum using Divide and Conquer” problem we have given an array of both positive and negative integers. Write a program that will find the largest sum of the contiguous subarray. Input Format The first line containing an integer N. Second-line containing an array of …

Read more

Number of Smaller Elements on Right Side

Problem Statement In the “Number of Smaller Elements on Right Side” problem, we have given an array a[]. Find the number of smaller elements that are on the right_side of each element. Input Format The first and only one line containing an integer N. Second-line containing N space-separated integers. Output …

Read more

Translate »