Subject Name: Data Structure Subject code: BCS 301
Q1. What is Time complexity? Q2. Explain Abstract data types Q3. Define Linked List. Q4. Write a program in C to create a linked list of 10 elements and to traverse the list. Q5. Define the term Array. What are various ways of representing two-dimensional array in memory? Q6. What are the advantages of linked list over array? Q7. Write an algorithm/C code to insert a node at the end of a singly linked list. Q8. Write an algorithm/C program that reverses the order of all the elements in a singly linked list. Q9. What are the advantages and disadvantages of array over linked list? Q10. Assume that the declaration of multi-dimensional arrays X and Y to be ,X(- 2:2,2:22)and Y(1:8,-5:5,-10:5). a. Find the length of each dimension and number of element in X and Y. b. Find the address of element Y(2,2,3), assuming base address of Y=400 and each element occupies 4 memory locations Q11. How to represent the polynomial using linked list? Write a algorithms to add two polynomials using linked list. Q12. Discuss doubly linked list. Write an algorithms to insert a node after a given node in singly linked list Q13. Define Time-Space Trade-off. Q14. Define a sparse matrix. Suggest a space efficient representation of sparse matrix.
Q15. List the advantages of doubly linked list over singly linked list.