Question

Analyze best case, average case, and worst-case time complexities of following algorithms with the help of suitable examples.

(i) Insertion sort

(ii) Quick sort

(iii) Binary search

(iv) Selection sort

28 May 2025
Answer :
Word Count : 344
(i) Insertion Sort Best Case: When the array is already sorted, each element is compared once. * Time complexity: O(n) * Example: \[1, 2, 3, 4, 5] Average Case: Each element may be compared with half of the sorted subarray. * Time complexity: O(n²) * Example: \[4, 3, 1, 5, 2] Worst Case: When the array is ________ ________ __________ ___ _________ ___ __________ ____ _______ __________ _________ ____.
_______ __________ ______ _________ _______ _______.
________ _________ ________ _______ ____ _______ _______.
___ ________ __________ _________ ________ ______.
________ ___ ________ __________ __________ ____ ___ _________ ______ _______.
_______ ___ ______ _________ __________ ___ _______ _________ _____ ___ _____ ______.
_________ _________ ___ _______ ____ _________.
___ _________ ________ _____ ___ ___ ___ _________ _____.
____ ____ _______ _________ _______ ______ ______ ___ _________ ____.
________ _________ _________ __________ _________ ____.
________ ________ _________ _____ ________ __________ _________ _________ ________ ______.
__________ ________ ___ _____ _________ ____ _______ __________ ____.
____ _____ __________ _____ ________ ___ ________ ___.
________ ___ ________ _____ ________ ______ ______ ___ ______ ___.
_____ _________ ______ ______ ____ _______.
__________ ______ ____ __________ _________ ______ ______ ______.
_______ __________ ____ __________ ______ _____ _____ _________ ______ ___ _____ ___.
__________ ___ ________ __________ ________ __________ _________.
_______ _______ ______ ___ _____.
_________ _______ ___ ________ ___ ________ ________ _________ ______.
_____ _______ _____ __________ ______.
_________ _________ ___ ___ _________ __________.
_________ ______ ________ ________ ___ ________ ___ _________ _______ __________.
_________ ____ _____ ____ ________ _______.
______ _______ ________ _______ ______.
____ ____ _____ ___ ___ _______ ______ ______ _________ ___.
___ ___ ____ ________ _____ ______ __________ ___ _____ ________ ___.
________ ____ __________ ______ ______ ___ __________ __________ _________ _____.
__________ ______ _________ ______ _____ ______ _______ ____.
_________ ____ _______ _______ _________ _______ __________ ________.
_________ ____ _____ __________ _______ ___ _________ ____ ___.
________ ____ __________ ________ _______ ________ __________ _____ _____.
___ _________ _______ __________ _____ __________ ______ _______ _____ _____ __________ _________.
____ ________ _______ _____ __________ _______ _____ __________ ______ _________.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Analyze best case, average case, and worst-case time complexities of f
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→