{"id":8568,"date":"2023-03-06T08:32:55","date_gmt":"2023-03-06T08:32:55","guid":{"rendered":"https:\/\/www.goodacademic.com\/blog\/questions\/execution-time-for-sorting-in-java\/"},"modified":"2023-03-06T08:32:55","modified_gmt":"2023-03-06T08:32:55","slug":"execution-time-for-sorting-in-java","status":"publish","type":"questions","link":"https:\/\/www.goodacademic.com\/blog\/questions\/execution-time-for-sorting-in-java\/","title":{"rendered":"Execution time for sorting in Java"},"content":{"rendered":"<p>Write a program that obtains the execution time of selection sort, insertion sort, merge sort, and quick sort for 50,000, 100,000, 200,000, 250,000 and 300,000.&nbsp;<\/p>\n<div><\/div>\n<div>Your program shall create data randomly and print a table like this:<\/div>\n<div><\/div>\n<div>Array Size\tSelection Sort\tInsertion Sort\tMerge Sort\tQuick Sort<\/div>\n<div>50,000&nbsp; &nbsp;&nbsp;<\/div>\n<div>100,000&nbsp; &nbsp;&nbsp;<\/div>\n<div>200,000&nbsp; &nbsp;&nbsp;<\/div>\n<div>250,000&nbsp; &nbsp;&nbsp;<\/div>\n<div>300,000&nbsp; &nbsp;&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div><\/div>\n<div>Submission<\/div>\n<div>1. Source code (.java)<\/div>\n<div><\/div>\n<div>2. A brief note discussing each sorting algorithm &#8211; approach (divide-and-conquer, recursive), performance (average, worse-case complexity in Big-O), and when to use each algorithm. One page is enough.<\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Write a program that obtains the execution time of selection sort, insertion sort, merge sort, and quick sort for 50,000, 100,000, 200,000, 250,000 and 300,000.&nbsp; Your program shall create data randomly and print a table like this: Array Size Selection Sort Insertion Sort Merge Sort Quick Sort 50,000&nbsp; &nbsp;&nbsp; 100,000&nbsp; &nbsp;&nbsp; 200,000&nbsp; &nbsp;&nbsp; 250,000&nbsp; &nbsp;&nbsp; [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"disciplines":[654],"paper_types":[],"tagged":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/8568"}],"collection":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions"}],"about":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/types\/questions"}],"author":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/comments?post=8568"}],"version-history":[{"count":0,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/questions\/8568\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/media?parent=8568"}],"wp:term":[{"taxonomy":"disciplines","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/disciplines?post=8568"},{"taxonomy":"paper_types","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/paper_types?post=8568"},{"taxonomy":"tagged","embeddable":true,"href":"https:\/\/www.goodacademic.com\/blog\/wp-json\/wp\/v2\/tagged?post=8568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}