Given a sorted array nums and an integer target, return a list of all indices where target appears, in ascending order. Return an empty list if target is not present. Solve in O(log n + k) where k is the count.
Input: A sorted integer array nums and integer target.
Output: List of all 0-indexed positions of target, sorted ascending. Empty list if not found.
Input: [1,2,2,3,3,3,4], 3
Output: [3,4,5]
Explanation: 3 appears at indices 3, 4, and 5.Input: [1,2,3,4,5], 6
Output: []
Explanation: 6 not present — empty list returned.Input: [5,5,5,5,5], 5
Output: [0,1,2,3,4]
Explanation: All 5 elements equal target.1 <= nums.length <= 10^5-10^9 <= nums[i] <= 10^9Sorted non-decreasing-10^9 <= target <= 10^9