Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- AI 경진대회
- dacon
- Git
- Real or Not? NLP with Disaster Tweets
- 데이콘
- 우분투
- hackerrank
- 맥북
- 금융문자분석경진대회
- SW Expert Academy
- 코로나19
- PYTHON
- 편스토랑 우승상품
- programmers
- 캐치카페
- 자연어처리
- leetcode
- github
- ubuntu
- ChatGPT
- 백준
- Docker
- Baekjoon
- 더현대서울 맛집
- 프로그래머스 파이썬
- gs25
- 프로그래머스
- Kaggle
- 파이썬
- 편스토랑
Archives
- Today
- Total
목록
반응형
Move Zeroes (1)
반응형
솜씨좋은장씨
[leetCode] 283. Move Zeroes (Python)
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Input: [0,1,0,3,12] Output: [1,3,12,0,0] Note: You must do this in-place without making a copy of the array. Minimize the total number of operations. Solution class Solution: def moveZeroes(self, nums): for i in range(len(nums))[::-1]: if nums[i] == 0: nu..
Programming/코딩 1일 1문제
2020. 6. 19. 21:18
반응형