Write an Algorithm for Binary Searching. |
|
University | Amity blog |
Service Type | Assignment |
Course | |
Semester | |
Short Name or Subject Code | Data and File Structure using C |
Product | of Assignment (Amity blog) |
Pattern | Section A,B,C Wise |
Price | Click to view price |
Data and File Structure using C
SECTION A
1. Write an algorithm for binary searching.
2 . Suppose Name1 is a linked list in memory. Write an algorithm that copies Name1 into a list Name2.
3. Consider the following infix expression Q: ((A+B)*D)↑ (E-F). Write an algorithm to convert it into postfix expression and hence find the postfix expression.
4 . Write an algorithm for insertion sort.
5. Sort the following array of elements using bubble sort: {3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8}
6. Write an algorithm for insertion and deletion from the queue.
7 . Explain different types of data structures.
8. Describe the tower of Hanoi problem. Show recursive moves for n = 4.
SECTION B
Case Detail:
Suppose each data structure is stored in a circular array with N memory cells.
1. Find the number NUMB of elements in a queue in terms of FRONT and REAR.
2. Find the number NUMB of elements in a deque in terms of LEFT and RIGHT.
3. When will the array be filled?
SECTION C
In an adjacency matrix parallel, edges are given by
A node n is adjacent to a node m if there is an arc from
Level of any node of a tree is
A complex number contains
A NULL pointer is used to tell