CSC160 (UG20) 01
    TPS 13: Complexity analysis
    Skip To Content
    Dashboard
    • Login
    • Dashboard
    • Calendar
    • Inbox
    • Help
    Close
    • My Dashboard
    • CSC160 (UG20) 01
    • Assignments
    • TPS 13: Complexity analysis
    SP 2021 (UNDG)
    • Home
    • Assignments
    • Modules
    • TC/WC Appt Scheduler
    • Collaborations
    • WSJ Context
    • EvaluationKIT Course
    • EvaluationKIT
    • Barnes & Noble Bookstore

    TPS 13: Complexity analysis

    • Due Apr 28, 2021 by 10am
    • Points 1
    • Submitting a file upload
    • File Types doc and docx
    • Available after Apr 28, 2021 at 9am

    Consider the following algorithm, which finds the maximum value in an unordered list. What is its time complexity relative to the size of list, n? Why?

    function FindMaxUnordered(list):
    set max to the first value in list
    for value in list:
    if value > max:
    set max to value
    return max

    The options are:

    • O(1)
    • O(log2(n))
    • O(n)
    • O(n2)

    Now consider this algorithm, which finds the maximum value in an ordered list. What is its time complexity? Why? (Same options as above).

    function FindMaxOrdered(list):
    return the last value in list

    After we've completed the group share portion, upload a copy of your updated TPS document.

    1619618400 04/28/2021 10:00am
    Additional Comments:
    Rating max score to > pts

    Rubric

     
     
     
     
     
     
     
         
    Can't change a rubric once you've started using it.  
    Find a Rubric
    Find Rubric
    Title
    You've already rated students with this rubric. Any major changes could affect their assessment results.
    Title
    Criteria Ratings Pts
    Edit criterion description Delete criterion row
    This criterion is linked to a Learning Outcome Description of criterion
    threshold: 5 pts
    Edit rating Delete rating
    5 to >0 pts
    Full Marks
    blank
    Edit rating Delete rating
    0 to >0 pts
    No Marks
    blank_2
    This area will be used by the assessor to leave comments related to this criterion.
    pts
      / 5 pts
    --
    Additional Comments
    Total Points: 5 out of 5