Exponential backoff with jitter
Your task
Compute a deterministic exponential-backoff-with-jitter schedule for a retry client. For attempt k (0-indexed) the uncapped delay is base2**k, capped at cap, giving exp = min(cap, base2**k). Jitter is full-jitter in [0, exp] derived from a deterministic LCG: starting from the given integer seed, before each attempt update state = (1103515245*state + 12345) % 2147483648, then the jittered delay is state % (exp + 1). Return the list of jittered delays for attempts 0..attempts-1. base, cap, seed are positive ints; attempts >= 0.
Examples
backoff_schedule(base: int, cap: int, attempts: int, seed: int) -> list[int]Example 1
Input
backoff_schedule(100, 1000, 3, 42)Output
[79, 122, 100]