Data Structure And Algorithms Using Java Assignment 2 Answers 2022

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

NPTEL Data Structure And Algorithms Using Java Assignment 2 Answers 2022

1. Which of the following is true in the case of Class Hashtable?

a. Like HashMap, Hasht able also stores key/value pairs. However, keys and values can be null.
b. Hashtable was made generic by JDK 5. It is declared like this: class Hashtable<k, V> Here, K specifies the type of keys, and V specifies the type of values.
c. Like HashMap, Hasht able also stores key/value pairs. However, neither keys nor values can be null.
d. There is one more difference between HashMap and Hashtable, that is, Hashtable is synchronized while HashMap is not.

Answer:- b, c, d

2. Which of the following is true in the case of method E peek0″?

a. Peek the element on the top of the stack. removing it in the process
b. Peek the element on the top of the stack, and return it
c. Retums the element on the top of the stack, but does remove it
d. Retums the element on the top of the stack. removing it in the process

Answer:- d

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW

Data Structure And Algorithms Using Java Assignment 2 Answers 2022

3. Which of the following is NOT a Java legacy class?

a. Dictionary
b. Hashtable
c. Vector
d. Set

Answer:- d

4. Which of the following statement(s) is/are true?

a. Iterator interface provides the facility of iterating the elements in a forward direction only.
b. List interface is implemented by the classes ArayList, LinkedList, Vector, and Stack.
c. Iterator interface provides the facility of iterating the elements in a backward direction only.
d. List interface supports duplicate values.

Answer:- a, c, d

5. Which of the following declaration(s) is/are correct to instantiate the List interface?

a. List <data-type> list1= new ArayList):
b. List <data-type> list2 = new LinkedList):
c. List <data-type> list3 = new Vector0:
d. List <data-type> list4 = new PriorityQueue)

Answer:- a, b, c

6. Which of the following is/are not core collection classes?

a. AbstractCollection
b. EnumSet
C. HashSet
d. AbstractQueue

Answer:- d

👇For Week 03 Assignment Answers👇

Data Structure And Algorithms Using Java Assignment 2 Answers 2022

7. Which of the following statement(s) is/are true?

a. Vector is similar to ArrayList which represents a dynamic array.
b. Vector is synchronized while ArrayList is not.
c. EnumSet is a Bit string data structure.
d. TreeSet is an Indexed data structure.

Answer:- a, b, c

8. Which of the following statement(s) is/are true according to the advantages of a collections framework?

a. Reduces programming effort.
b. Increases performance.
c. Reduces the effort required to leam APIs.
d. Provides interoperability between unrelated APIs.

Answer:- a, b, c, d

9. Which of the following() collection interface(s) is/are descendants of not java.util.Collection?

a. java.util.SortedMap
b. java.util.Set
c. java.util.SortedSet
d. java.util.Queue

Answer:- a

10. Which of the following is/are can be used if a variable can be accessed using Objeet class method?

a. Upper bound wildcard
b. Lower bound wildcard
c. Unbounded wildcard
d. No wildcard

Answer:- c

For More NPTEL Answers:- CLICK HERE

Join Our Telegram:- CLICK HERE

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 of data structures and algorithms. Further, those 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 to 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, to cope with the current demand of IT industries and solve many problems in their own filed of studies.

COURSE LAYOUT

  • Week 1: 1D array, list and vector, 2D matrices and tables of objects
  • Week 2: Java implementation of 1D and 2D arrays and its operations
  • Week 3: Linked lists and its various operations, stack and queue
  • Week 4: Java implementation of linked lists, stack and queue
  • Week 5: Binary trees: Representation and operations. Variations of binary tree: Binary search tree, Height balanced search tree, Heap tree
  • Week 6: Java implementation of binary trees and its variations
  • Week 7: Graph : Structure, representation and operations
  • Week 8: Java implementations of graph data structures
  • Week 9: Algorithms (Part-I): Searching and sorting algorithms
  • Week 10:Java implementation of Part-I algorithms
  • Week 11:Algorithms (Part-II): Greedy algorithms, shortest path algorithms
  • Week 12:Java implementation of Part-II algorithms

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of average of 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 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.

Leave a Comment