Question

Question 10 1 pts The constructor below is very similar to the one you used for the last assignment. What is its time complexity in terms of N, where N is the number of lines in the Input Stream (the word file)? public Doublets (Inputstream in) try t lexicon. new TreeSet String O; Scanner s new Scanner (new BufferedReader new I (in))) while (s hasNext String str s next boolean added lexicon. add Str s next Line in close catch (java io IOException e) System .err. println (Error reading from Inputstream. System exit (1) A. log N B. N C. N log N D. N
media%2Fe20%2Fe20e7f2c-e5db-4549-ac3d-c6
media%2Fb9e%2Fb9eb8af9-377c-4ff2-a832-2c
media%2Fe47%2Fe4720d12-a008-4fcf-a070-03
media%2F1a9%2F1a9449fd-54b1-4af4-aff3-55
media%2F316%2F3168eb24-0b20-47e6-9c0a-4e
media%2Fafc%2Fafcad2bd-7289-4e19-af2a-89
media%2F080%2F080271de-1b9a-4e51-a889-33
media%2F615%2F6159b0fa-3eab-4bfd-9d23-20
media%2F9e4%2F9e42f657-fef1-453f-b0fd-26Can anyone help me? Thank you very much.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

10. B. N

11. B. N/2k

12. B

13. D

14. D

15. D

16. B

18. B

Add a comment
Know the answer?
Add Answer to:
Can anyone help me? Thank you very much. Question 10 1 pts The constructor below is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can anyone helps to create a Test.java for the following classes please? Where the Test.java will...

    Can anyone helps to create a Test.java for the following classes please? Where the Test.java will have a Scanner roster = new Scanner(new FileReader(“roster.txt”); will be needed in this main method to read the roster.txt. public interface List {    public int size();    public boolean isEmpty();    public Object get(int i) throws OutOfRangeException;    public void set(int i, Object e) throws OutOfRangeException;    public void add(int i, Object e) throws OutOfRangeException; public Object remove(int i) throws OutOfRangeException;    } public class ArrayList implements List {   ...

  • Can someone help me to figure that error I have put below. JAVA ----jGRASP exec: javac...

    Can someone help me to figure that error I have put below. JAVA ----jGRASP exec: javac -g P4Program.java P4Program.java:94: error: package list does not exist Iterator i = new list.iterator(); ^ 1 error ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete. Note: Below there are two different classes that work together. Each class has it's own fuctions/methods. import java.util.*; import java.io.*; public class P4Program{ public void linkedStackFromFile(){ String content = new String(); int count = 1; File...

  • Hello, I am continuously receiving errors in the code below. Can you please show me what...

    Hello, I am continuously receiving errors in the code below. Can you please show me what I am doing wrong? import java.util.*; public class ShowTax { { public static void main(String [] args) {        Tax myTax = new Tax();        String ssn, maritalStatus, lname, fname,zipcode;        double income;        int numberOfVehicles;        Scanner s = new Scanner(System.in);        String regex = "[0-9]{3}-[0-9]{2}-[0-9]{4}";        do {            System.out.print("Enter the Social Security...

  • Can you help me rearrange my code by incorporating switch I'm not really sure how to...

    Can you help me rearrange my code by incorporating switch I'm not really sure how to do it and it makes the code look cleaner. Can you help me do it but still give the same output? Also kindly add an in-line comment on what changes and rearrangement you've done so I can understand what's going on. import java.util.ArrayList; import java.util.Scanner; public class Bank { /** * Add and read bank information to the user. * @param arg A string,...

  • can anyone help me to ans 27 26 25 . plz and thank you very much...

    can anyone help me to ans 27 26 25 . plz and thank you very much !!! if it is unclear for you to view plz right click the mouse and view it in a new tab, then it shows clean images. thank you and plz someone to answer these for me. Question 27 Not yet answered 6 7 Marked out of 23.00 12 13 14 Flag question 19 20 21 Presented below is information related to Victor Company at...

  • fisrt one is bicycle.java second code is bicycleapp.java can anyone help this??? please save my life...

    fisrt one is bicycle.java second code is bicycleapp.java can anyone help this??? please save my life Before you begin, DOWNLOAD the files “Lab8_Bicycle.java” and “Lab8_BicycleApp.java” from Canvas to your network drive (not the local hard drive or desktop). Once you have the files saved, RENAME THE FILES Bicycle.java and BicycleApp.java then open each file. 1) Look at the Bicycle class. Two of the many data properties we could use to define a bike are its color and the gear it...

  • (JAVA) Use the Pet.java program from the original problem (down below) Compile it. Create a text...

    (JAVA) Use the Pet.java program from the original problem (down below) Compile it. Create a text file named pets10.txt with 10 pets (or use the one below). Store this file in the same folder as your “class” file(s). The format is the same format used in the original homework problem. Each line in the file should contain a pet name (String), a comma, a pet’s age (int) in years, another comma, and a pet’s weight (double) in pounds. Perform the...

  • Thank you so much to anyone who decides to help me with this page. I am very grateful! 1. (4pts) How many signal...

    Thank you so much to anyone who decides to help me with this page. I am very grateful! 1. (4pts) How many signals do you expect each of the following compounds to have in its 'H NMR spectrum? Write the appropriate number below to each structure. OH OH H 2. (5.5pts) Use your spectrOscopy data table to identify the chemical shift range in which each of the identified signals in the folowing molecule wDuld be lournd in the 'H NMR...

  • Please help me in both questions, thank you very much :) QUESTION 4 John and Louise...

    Please help me in both questions, thank you very much :) QUESTION 4 John and Louise are trying to figure out how to spend their Saturday night. They will do things together, but value the following three possible activities differently. They can go to a music concert, watch the tennis, or have a picnic in the park. John would prefer to go to the concert but Louise does not really like the music that will be played. Meanwhile, Louise wants...

  • Hey I really need some help asap!!!! I have to take the node class that is...

    Hey I really need some help asap!!!! I have to take the node class that is in my ziplist file class and give it it's own file. My project has to have 4 file classes but have 3. The Node class is currently in the ziplist file. I need it to be in it's own file, but I am stuck on how to do this. I also need a uml diagram lab report explaining how I tested my code input...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT