作者归档:在线疯狂

RSS feed of 在线疯狂

[LeetCode]Longest Repeating Character Replacement

题目描述:

LeetCode 424. Longest Repeating Character Replacement

Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing ...

继续阅读

[LeetCode]Reconstruct Original Digits from English

题目描述:

LeetCode 423. Reconstruct Original Digits from English

Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order.

Note:

  1. Input contains only lowercase English letters.
  2. Input is guaranteed to be valid and ...

继续阅读

[LeetCode]Battleships in a board

题目描述:

LeetCode 419. Battleships in a board

Given an 2D board, count how many different battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules:

  • You ...

继续阅读