# Find Target Indices After Sorting Array (LeetCode 2089) Indices of target after sorting. ## Approach ```python def targetIndices(nums, target): nums.sort() return [i for i,x in enumerate(nums) if x==target] ``` ## Complexity - Time / space depend on the scan above; keep the solution linear when possible. ## Interview tip Narrate the invariant before coding. I drill these patterns with [AI assistant for technical interviews](https://www.linkjob.ai/coding-interview-copilot/) ahead of OA rounds. *Disclosure: I work on Linkjob AI, an interview copilot. The algorithm above stands on its own.*