← Pointer Manipulation

Micro-Drill #5 — Check if sorted

Pointer Manipulation Target: 10s

Sortedness check is a precondition guard for binary search and merge operations.

all(a[i] <= a[i+1] for i in range(len(a)-1))

Type it from memory. Go.

Practice Problems

Related Coding Drills

← Micro #4 Micro #6 →