Submitted Questions

• Conventional Iterative Algorithm

Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in postorder.

trivial

• Aug 19th, 2009

We define int visit[SIZEOFTREE] such that visit[i]=1 if i th node is visited=0 otherwise visit[NULL]=1 alwaysvoid posttrav_ite...

• Algorithm to Traverse Binary Tree

Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in preorder.

ratanlal

• Aug 14th, 2009

Preorder(node root)if root=NULL;returnelsedoprint "root->data"  preorder(root->left)preorder(root->right)end else

• Traverse Binary Tree in Inorder

Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in inorder.

ChrisL216

• Dec 13th, 2009

Void display(){    System.out.print(lnr(root));}void lnr(Node p){      // left node right    if(p == null) return;    lnr(p.left);    System.out.print(p.key);    lnr(p.right);}

• Post Order Binary Tree Traverse

Design a conventional iterative algorithm to traverse a binary tree represented in two dimensional array in postorder.

Shikhar Singhal

• Jun 10th, 2013

When tree is implemented using linked list rather than 2-d array

```Codevoid traverse(tree head)
{
}```

Sandhya.Kishan

• Mar 10th, 2012

In Postorder traversal sequence we first look for the left node then the right node and then the root. Algorithm:

```Codevoid postOrder(tNode n)
{
if(n==null)
return;
postOrder(n.left);
postOrder(n.right);
visit(n);
} ```

• Pre Order Binary Tree Traverse

Design a conventional iterative algorithm to traverse a binary tree represented in two dimensional array in preorder.

puzzlu

• Sep 21st, 2010

Binary tree in 2 dimensional array?Here is the solution for binary tree in link list as node
{int info;node *left;node *right;};preOreder(node * Tree){push(tree);while(stack is not empty){myNode= pop();print myNode->info;push(node->right);push(node->left);}}

• Quicksort Algorithm

Demonstrate the quicksort algorithm to sort a list of data elements

• Jan 3rd, 2010

Pick an element, called a pivot from the list. Reorder the list so that all elements which are less than the pivot come before the pivot and so that all elements greater than the pivo...

• Recursion

What is recursion? Which data structure is used for recursion

Jitendra Chittoda

• Sep 4th, 2011

Stack data structure is used to maintain the information about the recursive functions.

kbjarnason

• Jul 2nd, 2010

Recursion occurs when a function, either directly or indirectly, calls itself.  An example might be a factorial function:unsigned fact(unsigned n){   /* 0! is by definition 1; */ &...

Bring out the advantages of circular queue over linear queue

dharmraj

• Sep 5th, 2010

In CQ we utilize memory efficiently. because in queue when we delete any element only front increment by 1, but that position is not used later. so when we perform more add and delete operation, m...

• Prime Integer

Suggest two different methods of knowing if a given integer is prime and analyse them.

rrc_83

• Jun 21st, 2010

Prime Integer can be calculated as follows - if n < 2:  return Falseif n == 2 :   return True  // Only even number thats Primeif (n % 10) in [0, 2, 4, 5, 6, 8]:  return False&nb...

• Algorithm Profiling

What is meant by algorithm profiling?

anks1987

• Jun 25th, 2010

Profiling is the process of executing a correct program on different data sets to measure the time and space that is takes to compute the results.Thanks!

• Algorithm Characteristics

List out the characteristics of an algorithm

Sandhya.Kishan

• Mar 7th, 2012

1.It should be simple.
2.Generally written in simple language.
3.It involves finite number of steps.
4.should be executed in short period of time.
5.Output of algorithm should be unique.

• Importance of Algorithm

What is the importance of algorithms in the field of computer science?

Sandhya.Kishan

• Mar 7th, 2012

Algorithms are blue prints of a program which gives all the details and functionality involved in finding the solution to a problem.It is important as we can build a program on any platform with the help of an algorithm.