Question
A programmer is debugging a Selection Sort implementation. They notice that after the first pass, the smallest element is correctly placed at the beginning, but subsequent passes do not consistently place the next smallest element. What is a common logical error that could cause this?
Solution
The correct answer is D
More IT Operating System Questions
- Which network security device typically enforces a policy based on IP, port and protocol and can operate at transport and application layer when deep inspe...
- Which of the following protocol is used for discovering link layer address or MAC address, associated with a given internet layer address?
- Given a 2D array (matrix) in Python: matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] What are the values of matrix[1][2] and matrix[2][0] respectively?
- Consider the following Python code snippet: def calculate_sum(a, b): result = a + b return result x = 5 y = 10 to...
- Consider a min-heap represented as an array: [1, 3, 5, 7, 9]. If the element 2 is inserted into this min-heap, what will be the state of the heap array aft...
- Complete the Java code to replace all occurrences of a specific word (case-insensitive) in a string. public class RegexReplacer { public String rep...
- Which of the following statements accurately describes Third Normal Form (3NF) in database normalization?
- When should you use inheritance over composition?
- Which of the following tools is commonly used for compliance auditing in Unix/Linux environments?
- Which of these is a cloud-based IoT platform?