Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

46) 40) Which of the following finds the position of the second character in the

ID: 3583383 • Letter: 4

Question

46) 40) Which of the following finds the position of the second character in the string You can assume word does have at least two Qs in it. word find wordt word find .11) .find word word. rind t Q') .find word. rind 47) Suppose we start with the list 13, 10, 5, 7, 9, 2, 1, 81 After Two (2) iterations of the selection sort algorithm (as seen in class). what does the vst look like? a) 11, 2, 5, 7, 9, 10, 3.81 b) 13, 5, 10, 7,9, 2, 1, 8 c) 11, 2, 3, 10, 5, 7, 9, 8] 48) Suppose our implementation of a linear search in a list of size 100 has runtime 3 seconds when the target is not What is the expected runtime of a search in a list of size 20o when the target is not found? a) about 3 seconds b) about 6 seconds c) about 12 seconds 49) Suppose our implementation of a selection sort takes 3 seconds to sort a list of size What is the expected runtime to sort a list of size 200? a) about 3 seconds b) about 6 seconds c) about 12 seconds 50) Which sorting algorithm is best when the list is randomly ordered? a) insertion sort b) selection sort c) mergesort

Explanation / Answer

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote