2025 Jan OPPE 1 - Set 2¶
Section 1 · Question 1
Check If Number Divides Two Others
Check if c divides both a and b. Covers modulo arithmetic and the and operator.
Section 1 · Question 2
Check String Rotation
Check if one string is a rotation of another. Covers the double-concatenation trick and substring search.
SolvedSection 1 · Question 3
Find Missing Number in a Range
Find the one missing number from 1 to n. Covers the sum formula n*(n+1)//2 and set difference.
Section 2 · Question 1
Merge Dictionaries and Sum on Conflicts
Merge two dicts, summing values of shared keys. Covers dict.get(), key unions, and Counter.
Section 2 · Question 2
Most Frequent Numbers
Find all numbers tied at the highest frequency. Full I/O problem covering Counter and tie-handling.
Section 3 · Question 1
Employee Data Analysis
Four functions on employee records - filter, sum, ceiling to 500, and max salary after increment.
SolvedSection 3 · Question 2
Z Pattern
Print a Z-shaped pattern with stars. Full I/O pattern printing - diagonal moves right to left.
Solved