wat is the difference between array and pointer?
Answer Posted / unni
array is a fixed sequence collection of elements of the same datatype:
pointer contains memory address as their values...
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
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
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Should I learn c before c++?
What are pointers? What are different types of pointers?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
What is typedef example?
Find MAXIMUM of three distinct integers using a single C statement
What are identifiers c?
What is c mainly used for?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is volatile variable in c with example?
Why is c so powerful?
Where are the auto variables stored?
What are the types of i/o functions?
Explain what are run-time errors?