0 évaluation0% ont trouvé ce document utile (0 vote)
21 vues1 page
This document contains instructions and questions for a data structures exam. It includes 5 questions: 1) Write a C program to create a singly linked list for the polynomial 3x+1. 2) Determine if the statement "if f(n) is O(g(n)) then logf(n) is O(log(g(n)))" is true or false and justify the answer. 3) Explain how to determine if a matrix is sparse and provide a suitable representation for sparse matrices. 4) Explain how linked lists provide more flexibility than arrays and provide algorithms for insertion and deletion in a singly circular linked list. 5) Define ordered lists, provide two examples, discuss if C enumeration constants relate to ordered
Description originale:
Questions carry equal weight. Feel free to assume any missing data but
categorically mention it under the heading 'Assumptions for this question'
This document contains instructions and questions for a data structures exam. It includes 5 questions: 1) Write a C program to create a singly linked list for the polynomial 3x+1. 2) Determine if the statement "if f(n) is O(g(n)) then logf(n) is O(log(g(n)))" is true or false and justify the answer. 3) Explain how to determine if a matrix is sparse and provide a suitable representation for sparse matrices. 4) Explain how linked lists provide more flexibility than arrays and provide algorithms for insertion and deletion in a singly circular linked list. 5) Define ordered lists, provide two examples, discuss if C enumeration constants relate to ordered
This document contains instructions and questions for a data structures exam. It includes 5 questions: 1) Write a C program to create a singly linked list for the polynomial 3x+1. 2) Determine if the statement "if f(n) is O(g(n)) then logf(n) is O(log(g(n)))" is true or false and justify the answer. 3) Explain how to determine if a matrix is sparse and provide a suitable representation for sparse matrices. 4) Explain how linked lists provide more flexibility than arrays and provide algorithms for insertion and deletion in a singly circular linked list. 5) Define ordered lists, provide two examples, discuss if C enumeration constants relate to ordered
Data Structure Time One Hour M.M. 20 NOTE: Questions carry equal weight. Feel free to assume any missing data but categorically mention it under the heading Assumptions for this question 1. Write a C program to create singly linked list for polynomial 3x+1. 2. State true or false. Justify your answer i.e. give reason if your answer is true, give a counter example if your answer is false. if f (n) is O(g(n)) then logf (n) is O(log(g(n))). Assume that f (n) 1 and log(g(n)) > 0 for all n. 3. How one decides whether given matrix is a sparse matrix? Give suitable representation for a sparse matrix and use this representation to demonstrate row order preserving matrix transpose. 4. How linked lists provide more flexibility compared to arrays? Give algorithms along with suitable examples for insertion and deletion of element from a singly linked circular list with a header node. 5. What are ordered lists? Give two examples. Does enumeration constant of C programming language has any semantic relationship with ordered lists. Enumerate various operations associated with the ordered lists.
Declaration I value Examination Ethics and practice it.