2089. Find Target Indices After Sorting Array

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2089

class Solution:
    def targetIndices(self, nums: List[int], target: int) -> List[int]:
        nums.sort()
        return [i for i, v in enumerate(nums) if v == target]