Is double link list a linear data structure? If Yes, Why?If
No, Why?
Answer Posted / kiran
A data structure is said to be linear, if the elements are accessed in sequence. As the nodes of a DLL are accessed in sequence(starting from the first node, one after the other), it is a linear data structure.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
can any one provide me the notes of data structure for ignou cs-62 paper
How can I copy just a portion of a string?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
What are local static variables? How can you use them?
Can two or more operators such as and be combined in a single line of program code?
Does c have circular shift operators?
What are the advantages of c language?
What are the types of functions in c?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
Can the size of an array be declared at runtime?
Why c is called object oriented language?
How is pointer initialized in c?
Who invented b language?
When should a type cast be used?
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