1.What is a Data Structure? Explain its need?
2.What is a Directed Graph? Write an algorithm to find
whether a Directed Graph is connected or not?
3.Explain the process of converting a Tree to a Binary Tree.
Answer Posted / gsrinivas
1.Data structure is mathematicle model to represent a data
in a computers memory.programming becomes easy.
Is This Answer Correct ? | 12 Yes | 4 No |
Post New Answer View All Answers
What are the types of pointers in c?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
Explain the concept and use of type void.
What are nested functions in c?
How can I call a function with an argument list built up at run time?
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 we access the array using a pointer in c language?
How do we open a binary file in Read/Write mode in C?
Explain what is a stream?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Write a program to reverse a linked list in c.
What is difference between constant pointer and constant variable?
What is pre-emptive data structure and explain it with example?
Where static variables are stored in memory in c?
What is the use of pointers in C?