728x90
반응형
move zeros
-
[Leet Code] Two Pointers (투포인터): 283. Move Zeroes - EasyCS기초/Coding Test 2022. 11. 14. 01:19
* Two Pointers 알고리즘 설명 문제 / 코드 개인적으로 label은 easy인데 swap하는 방법을 생각을 못해 medium보다 오래 걸렸던 문제. 아직도 a, b = b, a로 구현하는 코드가 익숙하지 않다. 그리고 문제 푸는 시간을 정확하게 기록하는 습관을 들여야하는데 계속 까먹는다.. Description move all zeros in the array to the end of array. Other integers keep it's order, just move foward to keep the length of the original input array. Requirements - Do in-place w/o making a copy of the array. How to solve..