Question 1 of 24
In a programming scenario, a developer is tasked with creating an algorithm to sort a list of integers in ascending order. The developer decides to implement a bubble sort algorithm, which repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. If the list contains the integers [5, 3, 8, 4, 2], how many total comparisons will the algorithm make in its first pass through the list?
4
5
3
6

Preparing for Microsoft 98-380 Introduction to Programming Using Block-Based Languages (Touch Develop)? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free