yingdi1111
BAN USERvoid arrayFindSubMax(int *a,int length,int *i,int *j)
{
int max=0,sub,p,q;
*i=0;
*j=0;
for(p=0,q=1;q<length;)
{
sub = a[q] - a[p];
if(sub>max)
{
max = sub;
*i = p;
*j = q;
}
if(sub>0) q++;
else {p=q;q++;}
}
}
What is KMP?
- yingdi1111 February 19, 2012What is KMP?
- yingdi1111 February 19, 2012Can someone offer us a complete answer?
- yingdi1111 February 17, 2012Can someone offer us a complete answer?
- yingdi1111 February 17, 2012Correction.I mean it like this.
str = &onechar;
str = &secondchar;
However, we can not do it like this.
*str = thirdchar;
This is not allowed.
I hope it is clear now.
It defines a pointer str can be used to point to a constant char data.We can modify the data that the pointer str pointing to.However,each time we need to give it a const char data.We can not modify the value of the data using str because str can only be used to point to a constant data which means it can not be modified.
- yingdi1111 November 14, 2011
For the very first time,you also need to check.
- yingdi1111 February 19, 2012