본문 바로가기

부부의 코딩 성장 일기

검색하기
부부의 코딩 성장 일기
프로필사진 펩시_콜라

  • 분류 전체보기 (147)
    • Algorithm (135)
      • LeetCode (135)
    • Python (6)
      • Fundamentals (5)
      • Libraries (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/12   »
일 월 화 수 목 금 토
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 31
Tags
  • string
  • binary tree
  • linked list
  • two pointers
  • dfs
  • leetcode
  • 문자열
  • easy
  • Depth-first Search
  • 쉬움
  • DP
  • list
  • matrix
  • 리트코드
  • binary search
  • backtracking
  • HashTable
  • recursive
  • tree
  • 중간
  • Python
  • Array
  • 이진트리
  • 재귀
  • sorting
  • 미디움
  • Medium
  • hash table
  • math
  • Binary
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록leetcode26 (1)

부부의 코딩 성장 일기

LeetCode 26(Remove Duplicates from Sorted Array, Python)

1. 문제 링크 https://leetcode.com/problems/remove-duplicates-from-sorted-array/ 2. 문제 설명 이번엔 좋아요(13K)보다 싫어요(17.2K)가 더 많지만 그럼에도 상위에 있는 문제 오름차순으로 sort된 nums라는 배열이 있을 때, 중복이 없도록 array를 쌓고, unique 배열의 가장 마지막 index를 반환. 간단해보이지만, 전제조건이 "in-place"로, 기존의 데이터 구조를 변경하지 않고 정렬 또는 변환 작업을 수행해야 함 예시1) nums = [1,1,2] 일 때, nums = [1,2,_]로 변환하고, 2의 index인 1를 반환 예시2) nums = [0,0,1,1,1,2,2,2,3,3,4] 일 때, nums = [0,1,2,3..

Algorithm/LeetCode 2023. 11. 5. 20:34
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바