in java and add comments: Note: don't use collections, like list, HashSet (TreeSet), and HashMap (TreeMap) Code
Fantastic news! We've Found the answer you've been seeking!
Question:
in java and add comments:
Note: don't use collections, like list, HashSet (TreeSet), and HashMap (TreeMap)
Code that implements a set of items (strings) using a singly linked list. A set is a collection of items in which no item occurs more than once. code should externally support the following functions (the ones i'm stuck on):
- Return the number of items in the set. (Iterative Solution on geeksforgeeks is what i was thinking)
- Determine if an item is a member of the set.
- Return a reference to a specific node in the set (given an item)
- Determine the union (i.e. set of all distinctelements) and the intersection (i.e. set of all common distinctelements) of two sets.
- Include appropriate JUnit tests. (no main method)
- Count the time it takes to execute each of the above operations. Note: To count the time use system.currentTimeMillis().
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date: