Answer Posted / saroja patil
Array is simple program structure collection of homogeneous
data elements which are stored the elements are same data
same type and same size.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What are the 3 types of structures?
What is double pointer?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
Write a program to implement queue.
What is enumerated data type in c?
Explain how do you use a pointer to a function?
What are the different types of linkage exist in c?
Do you know the purpose of 'register' keyword?
What happens if you free a pointer twice?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Can the “if” function be used in comparing strings?
What is the condition that is applied with ?: Operator?
What is the use of in c?
What is a dynamic array in c?
What is pre-emptive data structure and explain it with example?