# Data Structure And Algorithms Using Java Assignment 4 Answers 2022

NPTEL Data Structure And Algorithms Using Java Assignment 4 Answers 2022:- In this post we have provided answers of NPTEL Data Structure And Algorithms Using Java Assignment 4. We provided answers here only for reference. Plz, do your assignment at your own knowledge.

## About Data Structure And Algorithms Using Java

With the growth of Information and Communication Technology, there is a need to develop large and complex software. For developing large software, software developers should have enough proficiency in data structures and algorithms. Further, that software should be platform independent, Internet-enabled, easy to modify, secure, and robust. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment.

Now, Java programming language is being used for mobile programming, Internet programming, and many other applications compatible with distributed systems. This course aims to cover the essential topics of data structures and algorithms and how the same can be implemented using Java programming language. The participants of the proposed course will be able to improve their skills, cope with the current demand of IT industries and solve many problems in their own field of studies.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of the best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

## NPTEL Data Structure And Algorithms Using Java Assignment 4 Answers 2022

1. What would be the asymptotic time complexity to insert a node at the end of a singly linked list, if the pointer is initially pointing to the head of the list?

a. O(n)
b. O(1)
c. O(nlogn)
d. O(logn)

`Answer:- a`

2. Which of the following is not a type of linked list?

a. Singly
b. Hybrid
c. Doubly
d. Circular

`Answer:- b`

3. Which of the followving operations are dependent on the length of the singly linked list (given pointers to first and last nodes)?

a. Deletion at the beginning
b. Deletion at the end
c. Insertion at the beginning
d. Insertion at the end

`Answer:- b`

4. What does the following function do for a given linked list with the first node as head?

a. Prints all nodes of linked lists.
b. Prints all nodes of linked list in reverse order
C. Prints altermate nodes of Linked List
d. Prints altermate nodes in reverse order

`Answer:- b`

5. Which of the following algorithms cannot be used on a linked list?

a. Linear search
b. Binary search
c. Reversal operation
d. Sorting

`Answer:- b`

6. Worst case time complexity to search an element in a linked list is?

a. O(n)
b. O(1)
C. O(nlogn)
d. Oflogn)

`Answer:- a`

7. What is the time complexity of deletion of the first node in a single linked list?

a. O(n)
b. O(1)
c. O(n*n)
d. O(logn) .

`Answer:- b`

8. If a stack is implemented using a linked list, what will be the time complexity of pop and push operations, respectively?

a. O(1). O(n)
b. O(n). (O)
C. O(l). O(1)
d. O(n). On)

`Answer:- c`

a. Random access is not allowed
b. Dynamic Size
C. Extra memory space for a pointer for each node.
d. Easy Insertion and Deletion.

`Answer:- b, d`

10. Which of the following is an application where a linked list structure can be used?

a. To implement a stack.
b. To mplement a queue.
C. To store a sparse matrix.
d. To store a polymomial of any degree.

`Answer:- a ,b, c, d`