Jack's SiteTech 技术Interview 面试Algo 算法26. Count Divisors26. Count DivisorsPattern: Math (O(1))Problem Given A, B, K, return count of integers in [A, B] divisible by K.Example:Input: A = 6, B = 11, K = 2 Output: 3 // 6, 8, 10Solution func countDivisors(a, b, k int) int { res := b/k - a/k if a%k == 0 { res++ } return res }O(1) — no loops needed.25. Trapping Rain Water27. MaxCounters