Coding round was about whether the part of the given input sequence is in the original sequence(seq was in integer type) or not. Original sequence order is 1,3,6,10,15,21,28,36 which is 0+1 is first number in array 0+1+2 is second number in array 0+1+2+3 is third number in array likewise others.
Sigiloso
Answer for the coding round question is this #include #define MAX 100 int main() { int a[MAX], cmp[MAX], i,j,k,sum=0,n,count=0; for(i=1;i<=MAX;i++){ for(j=1;j<=i;j++){ sum+=j; } cmp[i]=sum; sum=0; } printf("Enter the total number\n"); scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&a[i]); } for(i=1;i<=MAX;i++){ if(cmp[i]==a[1]){ j=i; break; } } for(j=i,k=1;k<=n;j++,k++){ if(cmp[j]==a[k]){ count=count+1; } } if(count==n){ printf("Answer is correct"); } else{ printf("Answer is incorrect"); } } CAN ANYONE SOLVE USING DYNAMIC ALLOCATION FOR THE ARRAY?