일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 파이썬
- 투포인터
- LeetCode
- GenerativeAI
- slidingwindow
- Microsoft
- 니트코드
- medium
- 파이썬알고리즘
- nlp
- 자연어처리
- Blazor
- dfs
- 구글퀵랩
- Python
- 생성형AI
- 파이썬기초100제
- gcp
- stratascratch
- SQL
- 코드업
- Python3
- 슬라이딩윈도우
- sql코테
- 알고리즘
- two-pointer
- codeup
- 리트코드
- 릿코드
- GenAI
Archives
- Today
- Total
목록lambda (1)
Tech for good

You can solve this problem by:Finding the k largest elements based on value (to maximize the sum).Preserving their original order in the array (since it's a subsequence).class Solution: def maxSubsequence(self, nums: List[int], k: int) -> List[int]: # Step 1: Pair each element with its original index indexed_nums = list(enumerate(nums)) # Step 2: Select the k larg..
IT/Computer Science
2025. 4. 4. 22:38