Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS2311-Data Structures and Algorithms with Python Homework 3 P Due Date: See Black Board Submission guidelines First design, develop and test your code in a

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

CS2311-Data Structures and Algorithms with Python Homework 3 P Due Date: See Black Board Submission guidelines First design, develop and test your code in a lupyter notebook or other development environment. Then copy your final code and markdown cells into the HW3Final.ipynb Jupyter Notebook file provided for the assignment and submit to Blackboard Note that the Jupyter Notebook for final submission may contain testing code to help you check that your output and expected match. Follow the instructions in the notebook for copying your code and running the testing code. If asked, also provide any supporting files or images requested in the assignment . Grading Criteria: Good documentation/comments and program readability using both markdown cells and code comments Algorithm/pseudo-code is explained in a markdown cell and is efficiently written Program runs correctly for test cases with no syntax errors or logical errors The instructor should be able to reproduce your work from your notebook. Topic: Algorithm Analysis 1. [40 points] Minimum in list algorithms - benchmark and plot Write two Python functions to find the minimum number in a list. The functions should take a random list of integers and return the minimum from the list. The first function, p1_f_linear(x), should do one pass through the list and be linear O(n). Use a for loop to search through the items in the list. The second function, called p1_f_quadratic(x), should compare each number to every other number on the list using nested loops giving a complexity of O(n^2). (By the way this is NOT a good algorithm, but we are doing it to illustrate the Big-O concept] To save you some time here is the code for this function: defp1_f_quadratic(x): min = x[0] = len(x) for i in range(l): for j in range(i+1,1): if x[i]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

Define the term intellectual property and describe its importance.

Answered: 1 week ago