All Computer Science Resources
Example Questions
Example Question #1 : Sorting
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 : Sorting
True or False.
Selection sort is quicker than MergeSort.
Possible Answers:
True
False
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.
Blossom
Certified Tutor
Certified Tutor
University of Maryland-Baltimore County, Bachelor of Science, Computer Science.
Suhani
Certified Tutor
Certified Tutor
University of Maryland-University College, Bachelor of Science, Computer Science.
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
ISEE Courses & Classes in San Francisco-Bay Area, ISEE Courses & Classes in Chicago, GMAT Courses & Classes in Philadelphia, GRE Courses & Classes in Philadelphia, Spanish Courses & Classes in San Diego, GMAT Courses & Classes in Seattle, SSAT Courses & Classes in Atlanta, GRE Courses & Classes in Denver, MCAT Courses & Classes in Phoenix, ACT Courses & Classes in Houston
Popular Test Prep
LSAT Test Prep in Los Angeles, GRE Test Prep in Phoenix, GMAT Test Prep in Phoenix, GRE Test Prep in New York City, SSAT Test Prep in Dallas Fort Worth, SSAT Test Prep in Philadelphia, ACT Test Prep in Houston, GRE Test Prep in Washington DC, SSAT Test Prep in New York City, SSAT Test Prep in San Diego