2026 Jan OPPE 1 - Set 1¶
Get Element at Circular Index
Return an element using wrap-around indexing. Covers idx % len(lst) and Python's non-negative modulo behaviour.
Signed Absolute Difference of Middle Digits
Find the middle digit(s) of a number and apply the sign of the input. Covers abs(n), parity-based slicing, and sign restoration.
Check Decreasing 4-Digit Number
Same as 2025 May Set 3 - S1Q1. Covers zip(s, s[1:]), all(), and chained comparisons.
Remove K Consecutive Duplicates
Remove runs of k or more identical consecutive elements. Covers itertools.groupby, the one-time-consumption pitfall, and extend().
Movie List Watch Time and Unique Movies
Parse multi-line movie lists, sum watch times, collect unique movies. Full I/O - covers set.update() and ", ".join(sorted(set)).
Student Score Operations
Four operations on student records - count, average, top student, pass count. Covers early returns, lambda dispatch dicts, and max(key=) tie-breaking.
Numeric Palindrome Hourglass
Print a hourglass of numeric palindrome rows. Full I/O - covers palindrome construction, n-k centering formula, and two-loop hourglass structure.