what is the difference between arrays and linked list
Answer Posted / najirabanu
Array has fixed length but linked list is not have fixed
length if u store a number in array means it must have
memory space according to the number but in linked list not
neccessary memory space according to the number
In linked list one node that contain pointer,that denoted
as addrs of another node
In array should not contain addrs of another node
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many types of operators are there in c?
Explain how does free() know explain how much memory to release?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Why is c known as a mother language?
Explain how can I right-justify a string?
Who developed c language and when?
Tell us bitwise shift operators?
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 curly brackets { } be used to enclose a single line of code?
What are the loops in c?
What is the meaning of 2d in c?
What is the purpose of & in scanf?
#include
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What is a dynamic array in c?