*你好每个人我都需要帮助,我想改变桌子中间的宠物,我不知道怎么回事?我修改了代码,我认为它现在更加隐蔽了,我真的需要你的帮助*
void quickSort(int *arr, int elements) {
#define MAX_LEVELS 300
int piv, beg[MAX_LEVELS], end[MAX_LEVELS], i=0, L, R, swap ;
beg[0]=0;
end[0]=elements;
while (i>=0) {
L=beg[i];
R=end[i]-1;
if (L<R)
{
piv=arr[L];
while (L<R)
{
while (arr[R]>=piv && L<R)
R--;
if (L<R)
arr[L++]=arr[R];
while (arr[L]<=piv && L<R)
L++;
if (L<R) arr[R--]=arr[L];
}
arr[L]=piv;
beg[i+1]=L+1;
end[i+1]=end[i];
end[i++]=L;
if (end[i]-beg[i]>end[i-1]-beg[i-1])
{
swap=beg[i];
beg[i]=beg[i-1];
beg[i-1]=swap;
swap=end[i];
end[i]=end[i-1];
end[i-1]=swap;
}
}
else
{
i--;
}
}
}
答案 0 :(得分:0)
NSDictionary *firstObject = json[0];
NSDictionary *newsletter = firstObject[@"newsletter"];
NSString *firstDescription = newsletter[@"description"];