1. (5 points) In Clojure, implement Quicksort. Do so in

1. (5 points) In Clojure, implement Quicksort. Do so in a function called quicksort with one argument, a vector of numbers. The function returns a sequence of sorted numbers. For example (quicksort [2 6 1 9 1]) returns (1 1 2 6 9). 

2. (5 points) In Clojure, implement Mergesort. Do so in a function called mergesort with one argument, a vector of numbers. The function returns a sequence of sorted numbers. For example (mergesort [2 6 1 9 1]) returns (1 1 2 6 9). 

3. (5 points) Test the two functions to ensure they sort correctly. 

4. (5 points) Implement Quicksort and Mergesort in any other language and make sure they sort correctly. 5. (5 points) In both languages, time your quicksort and merge sort functions on a sorted list of 1,000,000 numbers. Time them on a reverse sorted list of 1,000,000 numbers. If 1,000,000 numbers are not enough to see a difference between the two algorithms, increase the input size. 

6. (15 points) Evaluate your results. Which program was faster on the sorted input? Was it also faster on the input that was in reverse sorted order? Is the result the same in both languages? Explain your results. Were the results as expected? Can you say anything about the languages used for sorting in terms of performance and ease of implementation? 

7. (Extra Credit 5 points) Compare the performance of your implementations in both languages with the performance of the built-in sort function in each language. Explain the result.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

You are a sales manager for a corporation that sells

You are a sales manager for a corporation that sells software to local businesses. You have been asked to create a new training process for a new group of salespeople who have been recently hired. Describe your sales training process using the six interrelated steps discussed in your textbook. Be

Module Five Short Answer Assignment This week, we will examine

Module Five Short Answer Assignment This week, we will examine the reaction of China and Japan as the Western powers began to expand to these countries.  Japan would embrace these policies while China would resist modernization and colonial rule.  Consider the following information as you read through the learning modules

Follow these Essay Assignment Guidelines and the Essay Grading Rubric. Consult the Course Syllabus and Canvas and below this assignment description for the

Follow these Essay Assignment Guidelines and the Essay Grading Rubric. Consult the Course Syllabus and Canvas and below this assignment description for the assignment due date. Intergenerational Trauma and Healing provides multinational and multi-ethnic perspectives on the sources, effects, and modes of healing of intergenerational trauma among diverse communities; “Putting Down

Reply to: When I think of the scientific method, I

Reply to: When I think of the scientific method, I think of going through multiple steps of making sure that the original thought or idea is being tested and thoroughly looked at, this is how it can be seen as being superior due to it having facts supported it. When

Post Your Introduction [WLO: 1] [CLO: 2] In your initial post, introduce yourself to your peers and your instructor by creating a personal statement. The purpose of your personal statement, as opposed Nursing Assignment Help

Post Your Introduction [WLO: 1] [CLO: 2] In your initial post, introduce yourself to your peers and your instructor by creating a personal statement. The purpose of your personal statement, as opposed to a more general introduction, is to provide a picture of how you intend to use the Master

Confidentiality, integrity, and availability, or the CIA triad of security,

  Confidentiality, integrity, and availability, or the CIA triad of security, is introduced in this session. These three dimensions of security may often conflict. Confidentiality and integrity often limit availability.  So, a system should provide only what is truly needed. This means that a security expert has to carefully analyze

What are the political causes of rising income inequality in the USA?

The most sophisticated essays will make some use of theory to answer the specific question set. For example, consider how the power of the agents you are focusing on might relate to/ be fruitfully analysed through the ‘dimensions of power’ debate (see Culley and Hughey for one example of how

Based upon your careful reading of chapter 21, in what

Based upon your careful reading of chapter 21, in what ways did the struggles for independence of African and Asian peoples in the twentieth century parallel that of the “new nations” in the Americas of the eighteenth and nineteenth centuries?  In what ways did they differ?  Your response should discuss

Complete your Personal Leadership Profile matrix, and then write a

Complete your Personal Leadership Profile matrix, and then write a brief summary of your findings. As you prepare your analysis, consider the following elements in your documentation: Analyze the effectiveness of your leadership approach used in your role as change agent or consultant to lead your team. Analyze the effectiveness

Oral Health Behavior Intervention

Short version: Review of theoretical side of intervention for oral health behavioral change, which specifically targets adults, adults, 35-44 years old, less than high school education, and part of the Black/African American, Hispanic, or Native American communities. Requires review of an actual oral health behavior intervention. Intervention MUST have occurred

Using the change initiative you discussed in the previous discussion,

  Using the change initiative you discussed in the previous discussion, Stakeholder Analysis, or a similar change initiative, complete the force field analysis template in the Resources to include driving forces as well as restraining and resisting forces. Respond to the following: How can you disrupt the equilibrium to facilitate

MHA 505 UOP Structural Behavioral & Intersectional Nursing Assignment Help

I’m working on a health & medical multi-part question and need guidance to help me learn. what are examples of structural, behavioral and intersectional attributes of an organization? You are a medical professor in charge of creating college assignments and answers for medical college students. You design and conduct lectures,

In 250 words or more, answer the following. Your webtext

In 250 words or more, answer the following. Your webtext says, “In the world of finance, there is one certainty: you must take more risk to earn a higher return.” It then identifies the following types of risk: inflation risk, business risk, interest rate risk, and liquidity risk. Risk is a

You can choose one of the two options – read

  You can choose one of the two options – read the details below and on the handout. Basically: OPTION ONE – Imagine you have designed a new phone app and are pitching it to a tech company, like Don Draper on “Mad Men”.  Your storyboards will demonstrate why someone

Financial Management: Organizational Financial Planning

Develop an emergency management financial plan for your organization. Provide baseline information about your organization detailing the population and general budget information. Give examples or case study information about grants or historical declaration funding that supports your financial plan. If you do not work for a a government agency, research

Your focus will be on what asymmetric information, moral hazard,

Your focus will be on what asymmetric information, moral hazard, and adverse selection have to do with corporate hiring staff accountants. Instructions Consider the following statement: Many corporations require all staff accountants to hold not only a degree in accounting but also to have a CPA license. There is a substantial