283. Move Zeroes
·
Algorithm
Move Zeroes - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. 우선순위 큐를 이용해 zero index를 관리하는 해결법 from typing import * from heapq import * class Solution: def moveZeroes(self, nums: List[int]) -> None: q = [] for i in range(len(nums)): if nums[i] == 0: q.append(i) heapify(q) for i ..