Question

Question 8 A = 23n + 36n2        B = 6 + nlog2(n) + n      C =...

Question 8

  1. A = 23n + 36n2        B = 6 + nlog2(n) + n      C = log2n + 36n2

    Which one of the following is correct?

    A.

    TA = O(n2)    TB = O(n)   TC = O(log2n)

    B.

    TA = O(n2)      TB = O(nlog2(n))  TC = O(n2)

    C.

    TA = O(n2)      TB = O(+ nlog2(n))       TC = O(log2n)

    D.

    TA = O(n2)      TB = O(n)      TC = O(n2)

0.5 points

Question 9

  1. Three criteria are used to determine whether a data structure is acceptable for a particular application are:

    A.

    Cost, Speed and memory overhead

    B.

    Cost, type of storage, type of memory

    C.

    a and b

    D.

    None of above

0.5 points

Question 10

  1. Assume 16 lines of code per person per day. Estimate a program will consist of 300,000 lines of code. If the burdened cost of a programmer’s efforts is $150 per hour, determine the code of the program
    (page 10)

    A.

    45 million dollars

    B.

    10 million dollars

    C.

    90 million dollars

    D.

    22.5 million dollars

0.5 points

Question 11

  1. Procedural abstraction is:

    A.

    We do not need to know what the method is to use it

    B.

    We do not need to know the implementation details of the method in order to use it

    C.

    We do not need to know what methods the class has to use it

    D.

    We do not to know anything about the method to use it

0.5 points

Question 12

  1. The following is not true about Binary Search :

    A.

    Binary Search algorithm is a technique for rapidly finding a data item stored in an array

    B.

    Binary Search algorithm will return the index of the array elements where the search value is stored

    C.

    Binary Search algorithm can be applied on the unsorted arrays

    D.

    Binary Search algorithm assumes that the data in array are already sorted. in ascending order

0.5 points

Question 13

  1. Algorithm speed will consider the following factors:

    A.

    relative speed of the algorithm

    B.

    absolute speed of the algorithm

    C.

    do not need to consider anything

    D.

    a and b

0.5 points

Question 14

  1. Which one is not correct about the object (page 40)?

    A.

    Object is an instance of a class

    B.

    After an object is declared, the client code can invoke any public accessible methods declared in the class by using objectName.methodName()

    C.

    In Java, accessing information in objects requires only one memory access as primitive
    variable (page 40)

    D.

    In Java, accessing information in objects requires two memory

0.5 points

Question 15

  1. Which statement is not correct about data?

    A.

    Data is information

    B.

    Data can be input data or output data

    C.

    Studies show that programs spend only 10% of their execution time for searching through memory to locate the data they process

    D.

    The source of data can be any device attached to a computer system

0.5 points

Question 16

  1. Two objects, objectA and object, are objects of one class. The objectA is copied to objectB. How many objects exist after the copy if the copy is performed as a shallow copy?

    A.

    1

    B.

    2

    C.

    cannot know

    D.

    1 or 2 depending on real cases

0.5 points

Question 17

  1. Which one is true for Linear List?

    A.

    It is a collection of n nodes if there is a unique first node N1, unique last node Nn and only one node in the list

    B.

    It is a collection of n nodes if there is a unique first node N1, unique last node Nn and for any other node, only one node comes before it and only one node comes after it

    C.

    It is a collection of n nodes if there is a unique first node N1, unique last node Nn and for any other node, it can have one or more nodes come before or after it

    D.

    None of above

0.5 points

Question 18

  1. Which one is not correct about encapsulation?

    A.

    Encapsulation helps to reduce the cost of the software development. and maintenance

    B.

    Encapsulation produce the code is more easily reused

    C.

    Encapsulation is the idea that we write the code in a way that establishes compiler enforced protocols for accessing the data that the program process

    D.

    Encapsulation provides the code such that all the fields can be access from everywhere outside the class

0.5 points

Question 19

  1. Big-O analysis is __________

    A.

    An analysis technique that is used to set a bound of the upper limit of a mathematical function.

    B.

    An analysis technique that is based on the assumption that one of the term of the function will dominate all but negligible portion of the value of the function as the independent variable gets large.

    C.

    An analysis that is used to evaluate functional relationships

    D.

    All of above

0.5 points

Question 20

  1. Which one is correct about array?

    A.

    int [ ] myInt = new int;

    B.

    int [3]   myInt = new int;

    C.

    int [ ] myInt = new int[3];

    D.

    int [ ] myInt = new int(3);

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

8) OPTION B IS CORRECT BECAUSE IN ALGO A THE BIGGEST TERM IS n^2, in b the biggest term is n*log(n) and in c it is n^2

9) OPTION A IS CORRECT Cost, Speed and memory overhead

10) OPTION D IS CORRECT

11) We do not need to know the implementation details of the method in order to use it

12) Binary Search algorithm can be applied on the unsorted arrays

Note: Brother According to Chegg's policy we are only allowed to answer first 5 part if there are many. So, I request you to post other part as separate posts.

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Question 8 A = 23n + 36n2        B = 6 + nlog2(n) + n      C =...
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
  • Please answer this programming question as fast as possible. Will upvote 45 pts Question 2 Let...

    Please answer this programming question as fast as possible. Will upvote 45 pts Question 2 Let BSTree be the following class which implements Binary Search Tree (BST). a. (5 points) Write the method public int maxElement 0 that returns the element of the tree with maximum value if the BST is not empty and returns -1 otherwise. b. (10 points) Write the method public void preOrderPrint 0 that prints out all the elements in the BST in the order of...

  • QUESTION 8   In the _____ traversal, the root is processed first, before its subtrees. breadth first...

    QUESTION 8   In the _____ traversal, the root is processed first, before its subtrees. breadth first preorder postorder inorder 0.10000 points    QUESTION 9 What kind of traversal does the following algorithm (in pseudo-code) describe? Algorithm traversal (root) if (root is not null)      traversal (leftSubTree)      process (root)      traversal (rightSubTree) end if end traversal breadth first preorder inorder postorder 0.10000 points    QUESTION 10 What kind of traversal does the following algorithm (in pseudo-code)  describe? Algorithm traversal (root) if...

  • Question 16 You must put your data in classes if you use C++. True False 2...

    Question 16 You must put your data in classes if you use C++. True False 2 points Question 17 Constructors are automatically invoked during class instantiation. True False 2 points Question 18 To make your data accessible to entities outside of your class, declare the members of that class as private. True False 2 points Question 19 You can make arrays of built-in types like int and double, but not of user-defined types. True False 2 points Question 20 One...

  • 6.) (a) A string contains several X's followed by several O's. Devise a divide-and-conquer algorithim that finds the number of X's in the string in log2n steps, where n is the length of th...

    6.) (a) A string contains several X's followed by several O's. Devise a divide-and-conquer algorithim that finds the number of X's in the string in log2n steps, where n is the length of the string. (b) An array originally contained different numbers in ascending order but may have been subsequently rotated by a few positions. For example, the resulting array may be: 21 34 55 1 2 3 4 5 8 13 Is it possible to adapt the Binary Search...

  • In C++ Given a pointer to the root of a binary search tree (has left, right,...

    In C++ Given a pointer to the root of a binary search tree (has left, right, and parent pointers as well as a data section ) write a function (or functions) which will return an STL list (you should not define this class, it’s already included) with all of the values from the tree in sorted order. Your code should run in theta(N) time. for the second part,.given a pointer to the first node of a linked list, you are...

  • Can you please help with the below? 1)   Which of the following is true about using...

    Can you please help with the below? 1)   Which of the following is true about using a 2-3-4 tree? a.   It is designed to minimize node visits while keeping to an O(log n) search performance b.   It is designed to self-balance as new values are inserted into the tree c.   As soon as a node becomes full, it performs the split routine d.   None of the above 2)   Which of the following is true about a binary search tree? a.  ...

  • in the c programming language. List *init() {    head = ( List * ) malloc( sizeof(...

    in the c programming language. List *init() {    head = ( List * ) malloc( sizeof( List ) );    if ( head == NULL ) {       prtError( "Insufficient memory!" );       return( NULL );    }    head->data = -1;    head->next = NULL;    tail = head;    return ( head ); } /* Insert a new data element d into the list. */ /* Insert at the front of the list, right behind the dummy node. */ /* Return NULL if a new node...

  • Java eclipse question. Given a binary search tree -------------M ---------G ---------N ------D----- H ---B----F How woul...

    Java eclipse question. Given a binary search tree -------------M ---------G ---------N ------D----- H ---B----F How would you find the farthest from the root and most right side of the node? So, in this case, farthest nodes are B and F with height of 4 But the most right side of the node is F Therefore answer is F. I have //Will call helper method. public T findRightmostLowest(){ int lv = height();//This is the maxium height of the tree(4 in this...

  • You are going to implement Treesort algorithm in C++ to sort string data. Here are the...

    You are going to implement Treesort algorithm in C++ to sort string data. Here are the steps to complete the homework 1) Use the following class definition for binary search tree nodes. Its constructor is incomplete you should first complete the constructor. class TreeNode t public: string data; / this is the string stored in the node TreeNode left: TreeNode right; TreeNode (string element, TreeNode 1t, TreeNode rt //your code here 2) Write a function that will insert a string...

  • 16.26° 36.870 B A C 30 N FIGURE Q5.1 The 30 N weight shown in Figure...

    16.26° 36.870 B A C 30 N FIGURE Q5.1 The 30 N weight shown in Figure Q5.1 is suspended from the ceiling by ropes 1. T 36.87 3687 16 26 1626 30 N T T 16.26 1626 3687 36.87 30N HIGURE Q5.2 One of the correct free-body diagrams for this system is: Figure Q5.2 (a) Figure Q5.2 (b) Figure Q5.2 (c) Figure Q5.2 (d) 2. TC Tc TC 36.87 1626 30 N 30 N 30 N 30 N (c) FIGURE...

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