Download DFS-Assignment_List-2013

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

B-tree wikipedia , lookup

Red–black tree wikipedia , lookup

Linked list wikipedia , lookup

Quadtree wikipedia , lookup

Interval tree wikipedia , lookup

Binary search tree wikipedia , lookup

Transcript
DFS Assignment List - 2013
Lesson-1, Introduction:
1. Define Data Structure and explain its types.
2. State difference between linear and non-linear data structure with examples.
Lesson-2, Array:
1. List out all operations on array. Explain searching and insertion of elements in
array using algorithms.
2. Explain row major order and column major order. OR Explain storage
mechanisms for a 2-dimensional array.
3. What is Sparse Matrix? Explain in brief. OR Define Sparse Matrix with example.
4. An array X[4:5, 3:7] is stored in a memory whose starting address is 1001.
Assume that the word size is 2. Find the following:
a. Total elements in array X.
b. Total memory required to store the entire array.
c. Location for X[6][6] in row major and column major order.
5. Write a C program to perform insert, delete and search operation for 1dimensional array.
Lession-3, Linked List:
1.
2.
3.
4.
5.
6.
Write a short note on representation of linked list.
Write an algorithm for traversal of singly linked list.
What is the condition for overflow in linked list?
Write an algorithm to search an element in a Singly linked list.
Write an algorithm to delete a node from a singly linked list at any position.
Write an algorithm for deletion of node at any position from doubly linked list
with example.
7. Write an algorithm to insert an element into unsorted linked list.
8. Write algorithm to insert an element in sorted linked list and unsorted linked list.
9. Write an algorithm to insert a node into a doubly linked list at the front.
10. Explain insertion and deletion operation of doubly linked list using algorithm.
11. Write an algorithm to merge 2 singly linked lists.
12. Define Linked List. Explain split operation of linked list with algorithm.
13. What are the applications of a linked list? OR What is a header linked list and
state its any one application? OR Describe representation of polynomial using
linked list.
14. Give representation of following polynomials using linked list:
a. 22x4 + 27x3 + 30x2 – 9x – 5
b. 24x2y + 34xy2 + 15xy + 50
c. P(x,y,z) = 8x2y2z + 6xyz + 4x3y3z – 5x2y3 + 8x2y2z – 4xy7z3 + xy7z –
16yz8
15. Write a C program to perform create, insert, delete and display operations in a
circular linked list.
Lesson-4, Stack:
1. What is a Stack? Explain all the operations of stack with algorithm. Also list
applications of Stack.
2. Write an algorithm to PUSH, POP and PEEP element to/from the STACK. OR
Write an algorithm to perform PUSH, POP and PEEP operations on Stack.
3. Convert the following expressions to prefix and postfix:
a. ( ( ( A + B ) * C ) – D ) / F
b. ( ( P + ( ( Q ^ R ) – S ) ) * ( U – ( P / R ) ) )
4. Convert the following expression into POSTFIX using algorithm method:
a. ( ( A * B + C ) + D – E ) / ( G + H ) – ( I * J / K )
5. Convert the following Infix expression into Postfix expression using algorithm
method:
a. ( A * C + D ) – ( E – F + G / H ) + J
6. Convert following expression to postfix:
a. ( ( A – ( B / C ) ) ^ D ) / ( E – F ).
7. Consider the following expression and evaluate:
a. 15, 3, -, 2, *, 6, 6, /, 8. Write an algorithm for evaluating postfix expression for [ 5 4 6 + * 4 9 3 / + * ]
9. Write a C program to demonstrate any one application of Stack using C.
Lesson-5, Queue:
1.
2.
3.
4.
5.
6.
7.
What is a Queue? List all types of Queues and explain any two.
Write algorithm for insertion operation in Queue.
Write an algorithm to insert and delete from a simple queue.
Write a C program to implement Enqueue and Dequeue operation.
Write an algorithm to insert an element into Circular Queue.
State the condition for underflow for Circular Queue.
A circular queue Q has size 7 and front is at 3 and rear at 5. [Q = _ _ 25 40 50 _ _
]
a. Delete an element
b. Insert 85
c. Insert 90
d. Delete an element.
8. Consider the following CIRCULAR QUEUE which is allocated six memory cells.
[ _ M N O _ _ ] (Front: 2, Rear: 4). Describe the following operations:
a. P is added.
b. Two letters are deleted.
c. Q, R are added.
d. One letter deleted.
e. S, T inserted.
f. Three letters deleted.
9. Enlist the application area of Queue and explain in brief. OR Describe
applications of queue in detail.
10. Define double ended queue and its types. OR Define Input restricted Queue and
Output restricted Queue. OR State difference between input restricted deque and
output restricted deque.
11. State difference between Stack and Queue.
12. Write a C program to implement insertion and deletion of circular queue.
Lesson-6, Tree:
1. Define the following (with diagram):
a. Sibling
b. Height of Tree
c. Full Binary Tree
d. Complete Binary Tree
e. Skew Binary Tree
f. Forest
g. Threaded Binary Tree
h. Max Heap Tree
2. What are the properties of Binary Tree? OR Define Binary Tree and write its
properties. OR Explain any 2 properties of Binary tree.
3. Write recursive algorithm for inorder and postorder traversal. OR Explain inorder,
postorder and preorder traversal of binary tree with example.
4. Write an algorithm to create a Binary tree for [13, 3, 4, 12, 14, 10, 5, 1, 8, 12, 7, 9,
11, 16, 18]. Give its inorder, preorder and postorder traversals.
5. Evaluate the following expression tree for:
a. A = 4, B = 15, C = 5, D = 2, E = 3
Create expression tree for following: ( a + b ) * c – d ^ e.
Define Heap tree and explain insert and delete operation with example.
Write an algorithm to delete a node from Heap tree.
Create a max heap tree from following data: 19, 11, 15, 45, 25, 55, 65, 35, 75, 85,
95.
10. Write algorithm to search an element in Binary Search Tree. OR Explain deletion
operation of Binary Search Tree with all possible cases and examples. OR Define
BST. Explain insert, delete and search operation with example.
11. Explain insertion in AVL search tree using RR rotation. OR Define AVL tree.
Explain AVL rotations with example.
12. Explain B Tree.
13. State difference between full binary tree and complete binary tree.
6.
7.
8.
9.
Lesson-7, Searching:
1. Differentiate linear search and binary search methods. OR Define Linear search
and Binary search with suitable example.
2. What is searching? List out types of searching and compare them in terms of their
efficiency.
3. Give an algorithm for Binary search. OR Write an algorithm for binary search
with example.
4. Trace Binary search algorithm for following data: 121, 531, 322, 150, 432, 234,
381, 582.
5. Write a C program to implement Binary Search algorithm.
Lesson-8, Sorting:
1. Sort the following data using Bubble Sort: 81, 82, 56, 57, 30, 19, 84, 47, 42, 25
2. Explain Selection sort in detail with example and algorithm. OR Describe
Selection sort in detail with suitable example.
3. Write an algorithm for Insertion Sort. OR Write an algorithm for insertion sort
with example.
4. Trace the following data using Insertion Sort: 77, 33, 40, 10, 80, 22, 60, 50, 58,
45, 86, 01
5. Compare bubble sort and insertion sort in terms of their efficiency.
6. Give comparison between Selection Sort and Insertion Sort.
7. Write an algorithm for Quick Sort for sorting (38, 81, 22, 48, 13, 69, 93, 14, 45,
58, 79, 72) OR Write an algorithm to sort homogeneous data using Quick Sort.
OR Explain Quick sort in detail. OR Write an algorithm for Quick Sort.
8. Write an algorithm for Merge Sort. OR Explain Merge sort in detail.
9. Explain heap sort in detail.
10. Write a ‘C’ program to implement a Bubble Sort algorithm.
11. Write a C program to implement Selection sort.