본문 바로가기

Tech for good

검색하기
Tech for good
프로필사진 Diana Kang

  • All (164) N
    • Profile (2)
    • IT (150) N
      • Data Science (38)
      • Computer Science (91) N
      • Cloud (20)
    • Book & Article (11)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • Github
«   2025/05   »
일 월 화 수 목 금 토
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
  • GenerativeAI
  • two-pointer
  • stratascratch
  • LeetCode
  • GenAI
  • slidingwindow
  • codeup
  • Stack
  • 코드업
  • SQL
  • 릿코드
  • sql코테
  • heap
  • nlp
  • Greedy
  • 투포인터
  • dfs
  • 리트코드
  • 생성형AI
  • 슬라이딩윈도우
  • medium
  • 니트코드
  • 알고리즘
  • 파이썬
  • 파이썬기초100제
  • gcp
  • 파이썬알고리즘
  • Python
  • 자연어처리
  • Python3
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2025/05/24 (1)

Tech for good

[Leetcode/Greedy] 1903. Largest Odd Number in String

class Solution: def largestOddNumber(self, num: str) -> str: for i in range(len(num)-1, -1, -1): if int(num[i]) % 2 == 1: return ''.join(num[:i+1]) return "" # 64278# i = 3# num = [6, 4, 2, 7, 8]# num[:i] -> [6, 4, 2]# num[:i+1] -> [6, 4, 2, 7] Backward iteration in Pythonrange function is provided with three arguments(N, -1, -1). Use th..

IT/Computer Science 2025. 5. 24. 22:24
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바