Skip to main content

Algorithm Intuition: Guided Lab

Time: 90 minutes. Implement linear and binary search on sorted integer arrays. Include empty, singleton, first, last, duplicate, and absent-target cases. Declare whether duplicates return any match or the first.

Count comparisons for sizes 16,32,64 with a target above the maximum. Compare answers with a simple scan.

Acceptance: edge cases pass, the interval trace shrinks, and a count table supports your growth claim. Deliberately use unsorted input and explain why no correctness guarantee remains.

Review and remediation​

Submit the starting failure, intermediate trace, final result, and one limitation. Explain the result without running the implementation. If the acceptance check fails, return to the matching worked example, correct the model, then use a fresh input before resubmitting. Record any AI assistance and which claims you independently checked.