leetcode.cn 2025-02-27
🔴2296.design-a-text-editor
🏷️ Tags
#stack #design #linked_list #string #doubly_linked_list #simulation
🔴2296.design-a-text-editor
🏷️ Tags
#stack #design #linked_list #string #doubly_linked_list #simulation
Telegraph
design-a-text-editor
请你设计一个带光标的文本编辑器,它可以实现以下功能:
leetcode.cn 2025-03-17
🟡1963.minimum-number-of-swaps-to-make-the-string-balanced
🏷️ Tags
#stack #greedy #two_pointers #string
🟡1963.minimum-number-of-swaps-to-make-the-string-balanced
🏷️ Tags
#stack #greedy #two_pointers #string
Telegraph
minimum-number-of-swaps-to-make-the-string-balanced
给你一个字符串 s ,下标从 0 开始 ,且长度为偶数 n 。字符串 恰好 由 n / 2 个开括号 '[' 和 n / 2 个闭括号 ']' 组成。 只有能满足下述所有条件的字符串才能称为 平衡字符串 :
leetcode.com 2025-03-29
🔴2818.apply-operations-to-maximize-score
🏷️ Tags
#stack #greedy #array #math #number_theory #sorting #monotonic_stack
🔴2818.apply-operations-to-maximize-score
🏷️ Tags
#stack #greedy #array #math #number_theory #sorting #monotonic_stack
Telegraph
apply-operations-to-maximize-score
You are given an array nums of n positive integers and an integer k. Initially, you start with a score of 1. You have to maximize your score by applying the following operation at most k times:
leetcode.cn 2025-06-06
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
Telegraph
using-a-robot-to-print-the-lexicographically-smallest-string
给你一个字符串 s 和一个机器人,机器人当前有一个空字符串 t 。执行以下操作之一,直到 s 和 t 都变成空字符串:
leetcode.com 2025-06-06
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
🟡2434.using-a-robot-to-print-the-lexicographically-smallest-string
🏷️ Tags
#stack #greedy #hash_table #string
Telegraph
using-a-robot-to-print-the-lexicographically-smallest-string
You are given a string s and a robot that currently holds an empty string t. Apply one of the following operations until s and t are both empty:
leetcode.cn 2025-06-07
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
Telegraph
lexicographically-minimum-string-after-removing-stars
给你一个字符串 s 。它可能包含任意数量的 '*' 字符。你的任务是删除所有的 '*' 字符。 当字符串还存在至少一个 '*' 字符时,你可以执行以下操作:
leetcode.com 2025-06-07
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
🟡3170.lexicographically-minimum-string-after-removing-stars
🏷️ Tags
#stack #greedy #hash_table #string #heap_priority_queue
Telegraph
lexicographically-minimum-string-after-removing-stars
You are given a string s. It may contain any number of '*' characters. Your task is to remove all '*' characters. While there is a '*', do the following operation: