it must not give 49
Type: Posts; User: srivatsan
it must not give 49
but the code dosent work out for
50
49
58
51
60
it gives
50 49 58 60
i tried but still it didnt work
can u tell me why by looking at my code
#include<iostream.h>
#include<conio.h>
int maxRank (int curr, int* arr, int* rank) {
int max = 0 ;
for (int...
sorry i tried but i am unbale to get can u help me out !!
i tried by replacing
if (curr == 0) return ;
with
if (curr < 0) return ;
but still i am not getting the correct answer
so my recursion is ok
i am looking into it
from the morning i am breaking my head!!!
any way i will try if i dont get plz help me out
there is no other way other than calling the
function recursively
here is my corrected code
but i am not able to get you point
"Fix your base case in printReverse so that it prints the entire array, not "the entire array except for the first element". Oh, and...
i am sorry not able to get you
can u plz send me a sample code snippet
yes but dont know how to debug the code
any suggestions that u can give
suppose if i give
8 as the number of elments
and enter the elements as follows
1 4 8 2 5 7 3 6 => 1 4 5 7
i must get the output as 1 4 5 7
but i get
only 4 5 7
i am not able to find the...
i got the code for this problem but not able to find where i am wrong
my problem is as follows
Given an array of numbers, find the longest subsequence whose elements grow monotonically:
1 4 8...
Can someone tell me how the series is to be implemented in c
1,1,1 2,1 2 3,1 2 3 4 5, 1 2 3 4 5 6 7 8
here is my code
but i am not able to get the answer
#include<stdio.h>
int...