Question

46) 40) Which of the following finds the position Can I get only answers pls
46) 40) Which of the following finds the position
0 0
Add a comment Improve this question Transcribed image text
Answer #1

42.(c)O(n^2)

43.O(n^2)

44.(a) 8

46.(b)word(word.find('Q')+1:).find('Q')+word.find('Q);

47.(a)(1,2,5,7,9,10,3,8)

48.6 secs

49.(c)12 secs

50.(c)merge sort

Add a comment
Know the answer?
Add Answer to:
Can I get only answers pls 46) 40) Which of the following finds the position of...
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
  • Sorting Sort the following array using the quick sort algorithm: (4 Marks) a. 12 26 8...

    Sorting Sort the following array using the quick sort algorithm: (4 Marks) a. 12 26 8 9 7 0 4 Pivot selection is defined to be the first element of each sub-list. Show the array before and after each quicksort round (when the array is partitioned after placing the pivot at its correct position). Also, clearly highlight the pivot in each partition b. Consider an unsorted array of integers of size n. Write a Java program to arrange the array...

  • Assume a sorted relation has 40 GB (file size), block size is 4KB, each block stores 40 records. ...

    Assume a sorted relation has 40 GB (file size), block size is 4KB, each block stores 40 records. Assume the index B+ tree has entries for each record, and the fanout of the node for B+ tree is 100. Select with an equality condition on the attribute, search key of index. Assume the disk seek cost is 5 milliseconds, and block transfer cost is 1 milliseconds. Also assume if the selection is a non key attribute, there are 100 matching...

  • C++ Sorting and Searching 1. Mark the following statements as true or false. a. A sequential...

    C++ Sorting and Searching 1. Mark the following statements as true or false. a. A sequential search of a list assumes that the list elements are sorted in ascending order. b. A binary search of a list assumes that the list is sorted. 2. Consider the following list: 63 45 32 98 46 57 28 100 Using a sequential search, how many comparisons are required to determine whether the following items are in the list or not? (Recall that comparisons...

  • Prob. 3. Given the following data 50 40 23 36 19 20 9 a) Is this...

    Prob. 3. Given the following data 50 40 23 36 19 20 9 a) Is this a max heap, draw the tree and check if this is a max heap. b) Illustrate how you would add a new data 46 to the existing maxheap. c) From the answer obtained in part b, illustrate how you would delete the data 40 d) Now illustrate heap sort with the existing data after step c. Give steps, and find runtime. Runtime|Explanation of Algorithm...

  • Interfaces 1. What is inside an interface definition? What does a class do to an interface...

    Interfaces 1. What is inside an interface definition? What does a class do to an interface and what keyword is involved? How does a class do this to an interface (what should we find in the class)? Can an interface have a generic parameter? How do you instantiate an interface as an object? What methods can’t you use on an interface type? Abstract Data Types 2. What does an ADT define? Does an ADT specify programming language and/or data structures...

  • 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.  ...

  • Someone help me with the following questions using java Canvas x New Tab Help Center Submitted...

    Someone help me with the following questions using java Canvas x New Tab Help Center Submitted Dec 3 at T0:06pm This attempt took 3 minutes. Question 1 0/0.5 Which of the following lists of numbers would accurately show the array after the first pass through the Selection Sort algorit Index 0 Value 12 18 4, 9, 12.2.6,8.18 9, 4, 12, 2,6,18,8 2,4,9,12, 6, 8. 18 2. 4, 6, 8, 9,12,18 2. 4, 12,9.6,8,18 0/0.5 pts Question 2 the array after...

  • please check my answers if it wrong answer me a) (25 points) Suppose that you are...

    please check my answers if it wrong answer me a) (25 points) Suppose that you are asked to analyze the performance. Algorithms operate on 1D array of size nor 2D a of the algorithms below, write down the Big O or order of grow terms of n. If the algorithm cannot be applied to the array, write 0(1), O(log n), O(n), O(n logn), 90), O(n"), O(n!). The will only be given for reasonable Big O answers. & algorithms for their...

  • Part B (BI). Implement a Red-Black tree with only operation Insert(). Your program should read from...

    Part B (BI). Implement a Red-Black tree with only operation Insert(). Your program should read from a file that contain positive integers and should insert those numbers into the RB tree in that order. Note that the input file will only contain distinct integers. Print your tree by level using positive values for Black color and negative values for Red color Do not print out null nodes. Format for a node: <Node_value>, <Parent_value>). For example, the following tree is represented...

  • Just Q3 and Q4 Q1] Write a C function to implement the binary search algorithm over...

    Just Q3 and Q4 Q1] Write a C function to implement the binary search algorithm over an array of integer numbers and size n. The function should return the index of the search key if the search key exists and return - 1 if the search key doesn't exist. [10 Points] Q2] Write a C function to implement the selection sort algorithm, to sort an array of float values and size n. The function should sort the array in ascending...

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