1) How do you create the mirror copy of a tree (left node becomes right and viceversa)
2)How do you build a tree given inorder and postorder traversals of it?
3)How do you build a tree given inorder and preorder traversals of it?
4)Can you build a tree given preorder and postorder traversals?If yes, then give the procedure.If no,then give a reason as to why?
5)Find the closest ancestor of a 2 given nodes in a binary search tree(use the property of binary search tree)?
6)How do you implement trees in array?
7)How many binary trees can be constructed from N nodes?(the structure of the tree is debated question)
8)How do you find the greatest and least among leaves?
9)How do you check whether a tree and it mirror image are equal?
10)How do you find the minimum and maximum elements in a binary search tree?
AVL Trees
11)How is an AVL tree different from normal binary tree?
12)Give an expression for the minimum no of nodes of a AVL tree of height H?
13)Give the operations required to convert a normal binary tree in to a AVL tree?
14)How many bits are required per node to store the height of a node in a N-node AVL tree?
15)Keys 1,2,3,........,2^k -1 are inserted in order into an initially empty AVL tree.
Prove that the resulting tree is perfectly balanced.
16)Write routines for all the rotations employed in AVL trees?
17)What is the smallest AVL tree that overflows an 8-bit height counter?
18)Write a function to generate a perfectly balanced binary search tree of height H with distinct keys 1 through 2^(H+1)-1 ?Give also the running time of the above function?
19)What are the complexities of insertion,deletion and search on an AVL tree?
20)Write routines for insertion,deletion in an AVL tree?
Search Your Question
Tuesday, July 22, 2008
Trees - commonly asked interview questions!
Labels:
Data Structures
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2008
(992)
-
▼
July
(288)
- Yahoo Interview
- Yahoo Interview Questions
- Yahoo Interview Questions-1
- Yahoo Interview Questions-2
- Visual Basic Interview Questions -7
- Visual Basic Interview Questions -6
- Visual Basic Interview Questions -5
- Visual Basic Interview Questions -4
- Visual Basic Interview Questions -3
- Visual Basic Interview Questions -2
- Visual Basic Interview Questions -1
- SQL Interview Questions -8
- SQL Interview Questions -7
- SQL Interview Questions -6
- SQL Interview Questions -5
- SQL Interview Questions -4
- SQL Interview Questions -3
- SQL Interview Questions -2
- SQl Job Interview Questions
- Solutions to C programming questions
- Modified Array based QuickSort with respect to the...
- Last Non Zero Digit of Factorial
- Quick Sort routine to find the kth smallest elemen...
- Run time Analysis of QuickSort ,Nature of Input,Pi...
- Tree Arithmetic
- Number of ways to express a number as summation of...
- Solutions to Logical Puzzles-2
- Combinations
- Solutions to Basic C Interview Questions
- Solutions to Logical Puzzles-1
- Solutions to Logical Puzzles-3
- C program to find the height of a binary search tree
- C program to determine the number of nodes in a bi...
- C program to delete a tree
- Minimum Value of a Binary Search Tree
- Solutions to Questions on recursion
- C program to create mirror copy of a tree
- Solutions to Amazon Intern Interview Questions
- Traversals of a Binary Tree
- Solutions to Google Top Interview Puzzles
- Solutions to problems in recursion analysis
- solution1
- C-program to make a copy of a tree
- C-program to check whether a binary tree is a Bina...
- C-program to delete a node from a tree
- Search On a Binary Search Tree
- C-program to count the leaves in a tree
- Some Basic Questions on sorting and their solutions
- Resume Tips
- Secrets of a Selling Resume
- The Three R's of Resume Writing
- Top Ten Pitfalls of a Resume
- Ten Tips for Writing Better Resumes
- Frequently Asked Questions - Object oriented Concepts
- Frequently Asked Questions - Operating System Conc...
- Frequently Asked Questions - Database
- Frequently Asked Questions - Networking
- UNIX Concepts
- Resources For Placements Preparation
- Essentials Of Operating Systems
- Networking Concepts
- Microsoft Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Important Puzzles
- Practise Puzzles - 1
- Practise Puzzles - 1
- Practise Puzzles - 2
- Practise Puzzles - 2
- Practise Puzzles - 2
- Answers For Practise Puzzles - 1
- Answers for Practise Puzzles - 2
- Practise Puzzles - 3
- Practise Puzzles - 3
- Practise Puzzles - 3
- Answers for Practise Puzzles - 3
- Practise Puzzles - 4
- Practise Puzzles - 4
- Answers For Practice Puzzles - 4
- Puzzles
- Logical Puzzles-1
- Logical Puzzles -2
- Logical Puzzles-3
- Algorithms And Programming #4
- Algorithms And Programming #5
- Algorithms And Programming #6
- Algorithms And Programming #7
- Algorithms And Programming #8
- Algorithms And Programming #9
- Prime Numbers!
- C Programming Puzzles
- C Programming Puzzles 2
- C Programming Puzzles 3
- C Programming Puzzles 4
-
▼
July
(288)
No comments:
Post a Comment