What would the C equivalence to this be???
I’m trying to make a function that counts the nth biggest num ina column in a sorted array
(skipping over any duplicates).
never mind.
Solution
thanks for the question, here is the function in C to find thenth biggest number in the column, now the array can be sortedascending or descending order. I have assumed the array is sortedin ascending order.
Here is the full code and the screenshot
=======================================================================================
#include<stdio.h>
// function returns the nth biggest sum
// assuming the numbers are sorted in ascending order
int nthBiggest(int *iptr, int size, int nth) {
// the current largest number
int count=1;
// will
OR
OR