题库chevron_right解题模式chevron_right数学·string
schema可复用解题模式

数学·string模式

模式页更适合建立可迁移的解题框架。先抓识别信号,再反复练状态定义、更新规则和边界解释,能比零散刷题更快形成稳定手感。

database35 道题tune16/12/7 难度梯度category6 个关联题型

模式摘要

先识别什么

题目里常出现可以复用的状态更新节奏。

解法节奏

先口述状态和不变量,再解释每一步如何更新,最后用反例验证边界。

高频失分点

状态定义说不清,写出来也难以稳定维护。

识别信号

  • 题目里常出现可以复用的状态更新节奏。
  • 暴力枚举太慢,但结构上存在可维护的不变量。
  • 面试追问通常会盯住边界、状态变更和复杂度。

解题流程

  1. 1. 明确窗口/状态定义
  2. 2. 更新状态并维护约束
  3. 3. 用边界样例验证

常见失分点

  • 状态定义说不清,写出来也难以稳定维护。
  • 只会背模板,解释不了为什么这样更新。
  • 样例能过,但边界和复杂度追问容易崩。

推荐题单梯度

题库

数学·string模式题库

这里更适合先按关键词或难度找题,再按关联题型切入。题库会在容器内继续滚动时慢慢续载,避免模式页被长列表一下子拉穿。

慢加载模式题库

适合先建模式理解,再扩展到完整题单。

hourglass_bottom容器内滚动续载
search
tune难度
category题型聚焦

当前展示 24 / 35 道题目

每次续载 24 题
#题目难度
43

字符串相乘

Multiply Strings requires simulating integer multiplication using only string operations without direct numeric conversi…

中等
67

二进制求和

Add Binary involves summing two binary strings and returning the result as a binary string using math and string manipul…

简单
168

Excel 表列名称

Convert a positive integer to its corresponding Excel column title using base-26 math and string manipulation efficientl…

简单
171

Excel 表列序号

This problem requires converting an Excel column title into its corresponding column number by applying a math and strin…

简单
273

整数转换英文表示

Convert a given integer to its English words representation using mathematical logic and string manipulation.

困难
405

数字转换为十六进制数

Convert a 32-bit integer to its hexadecimal string using math operations and careful string manipulation techniques.

简单
412

Fizz Buzz

Generate a list from 1 to n replacing multiples of 3 with Fizz, 5 with Buzz, and both with FizzBuzz efficiently.

简单
415

字符串相加

Given two non-negative integers as strings, sum them and return the result as a string without converting to integers di…

简单
504

七进制数

Convert any given integer to its base 7 string representation using efficient math and string manipulation techniques.

简单
537

复数乘法

This problem requires multiplying two complex numbers, given in string form, and returning the result in the same format…

中等
564

寻找最近的回文数

Identify the nearest palindrome to a given integer string, handling ties and large numbers efficiently using math and st…

困难
592

分数加减运算

Solve fraction addition and subtraction by handling expressions, calculating results, and simplifying fractions to irred…

中等
640

求解方程

Solve the equation for the variable 'x' and determine its value or state if there is no solution or infinite solutions.

中等
899

有序队列

Given a string and integer k, rearrange characters to achieve the lexicographically smallest string using limited rotati…

困难
906

超级回文数

Count all super-palindromes in a given numeric range, where each is a palindrome and square of a palindrome.

困难
972

相等的有理数

Given two rational numbers as strings with possible repeating decimals, determine if they represent the same number.

困难
1041

困于环中的机器人

Determine if a robot following a repeated instruction sequence stays within a bounded circle using math and string simul…

中等
1071

字符串的最大公因子

Find the greatest common divisor string between two strings based on the math and string patterns.

简单
1154

一年中的第几天

Calculate the day number of the year based on a given Gregorian calendar date in the format YYYY-MM-DD.

简单
1360

日期之间隔几天

Calculate the exact number of days between two dates using string parsing and arithmetic logic with consistent accuracy.

简单
1447

最简分数

Generate simplified fractions between 0 and 1 with denominators up to a given integer n.

中等
1513

仅含 1 的子串数

Calculate the number of contiguous substrings containing only 1s in a binary string using a math and string approach eff…

中等
1573

分割字符串的方案数

Count the number of ways to split a binary string into three non-empty parts with equal numbers of '1's.

中等
1759

统计同质子字符串的数目

This problem requires counting all homogenous substrings in a given string and returning the result modulo 10^9 + 7.

中等

swap_vert在题库框内继续向下滚动,也会自动续载

按题型继续深入

模式学会之后,最好回到具体题型里做迁移训练。这样更容易分清楚“模式本身”和“场景变化”分别在哪里。

route

引导式练习路径

AI 会按你的当前水平推荐题目,并持续记录练习进度。

开始引导练习arrow_forward
LeetCode 数学·string模式题解:35题训练路线