All Computer Science Resources
Example Questions
Example Question #1 : Selection Sort
What is the worst-case run-time of selection sort (in Big-O notation?)
Possible Answers:
Correct answer:
Explanation:
Selection sort is comprised of outer and inner for loops that swap elements of the unsorted array into a sorted array. The largest possible number of times each loop can run is the number of elements in the array. Thus, the worst possible run time is .
Example Question #1 : Selection Sort
True or False.
Selection sort is quicker than MergeSort.
Possible Answers:
False
True
Correct answer:
False
Explanation:
MergeSort is has a running time of O(N). Selection sort has a running time of O(N2). Selection sort has O(N2) comparisons due to the swap in the algorithm.
David
Certified Tutor
Certified Tutor
The University of Texas at El Paso, Bachelor of Science, Materials Engineering.
Yoonsik
Certified Tutor
Certified Tutor
Seoul National University, Bachelor of Science, Physics. University of Pennsylvania, Doctor of Philosophy, Atomic and Molecul...
All Computer Science Resources
Computer Science Tutors in Top Cities:
Atlanta Computer Science Tutors, Austin Computer Science Tutors, Boston Computer Science Tutors, Chicago Computer Science Tutors, Dallas Fort Worth Computer Science Tutors, Denver Computer Science Tutors, Houston Computer Science Tutors, Kansas City Computer Science Tutors, Los Angeles Computer Science Tutors, Miami Computer Science Tutors, New York City Computer Science Tutors, Philadelphia Computer Science Tutors, Phoenix Computer Science Tutors, San Diego Computer Science Tutors, San Francisco-Bay Area Computer Science Tutors, Seattle Computer Science Tutors, St. Louis Computer Science Tutors, Tucson Computer Science Tutors, Washington DC Computer Science Tutors
Popular Courses & Classes
SSAT Courses & Classes in Atlanta, ACT Courses & Classes in Washington DC, ISEE Courses & Classes in San Francisco-Bay Area, GRE Courses & Classes in Washington DC, GMAT Courses & Classes in Dallas Fort Worth, LSAT Courses & Classes in San Francisco-Bay Area, ISEE Courses & Classes in San Diego, MCAT Courses & Classes in Washington DC, Spanish Courses & Classes in Houston, MCAT Courses & Classes in San Francisco-Bay Area
Popular Test Prep
LSAT Test Prep in San Francisco-Bay Area, ACT Test Prep in Washington DC, ISEE Test Prep in San Francisco-Bay Area, ISEE Test Prep in Philadelphia, GMAT Test Prep in Dallas Fort Worth, GMAT Test Prep in Philadelphia, GRE Test Prep in Washington DC, MCAT Test Prep in Los Angeles, GMAT Test Prep in Boston, GRE Test Prep in Philadelphia