LeetCodechevron_rightSolve patternschevron_rightmath string
schemaReusable solving pattern

math string Pattern

Pattern hubs are for building transferable solving frames. Learn the recognition signals first, then drill state definition, update rules, and edge explanation until the pattern feels stable.

database35 problemstune16/12/7 difficulty mixcategory6 linked topics

Pattern brief

Recognize first

Check if the candidate handles carry propagation correctly in a digit-by-digit simulation.

Solve rhythm

State the active state and invariant first, explain how each update preserves them, then pressure-test with counterexamples.

Most common miss

Failing to reverse the input strings before multiplying can misalign digits and produce incorrect results.

Recognition signals

  • Check if the candidate handles carry propagation correctly in a digit-by-digit simulation.
  • Watch for attempts to convert strings directly to integers, which violates constraints.
  • Do you handle carry properly when adding binary digits?

Solve flow

  1. 1. Define the active state/window.
  2. 2. Update state while preserving invariants.
  3. 3. Validate with edge-heavy examples.

Common misses

  • Failing to reverse the input strings before multiplying can misalign digits and produce incorrect results.
  • Ignoring the carry during addition can lead to incorrect results.
  • Forgetting to subtract 1 before modulo leads to incorrect letters for multiples of 26.

Recommended Ladder

Problem bank

math string pattern bank

Start by scanning with search or difficulty filters, then narrow by linked topics. The bank continues loading inside its own container so the page stays readable.

Progressive pattern bank

Use it to build pattern understanding first, then expand into the full corpus.

hourglass_bottomScroll inside to continue
search
tuneDifficulty
categoryTopic focus

Showing 24 / 35 problems

+24 per load
#TitleDifficulty
43

Multiply Strings

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

Medium
67

Add Binary

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

Easy
168

Excel Sheet Column Title

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

Easy
171

Excel Sheet Column Number

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

Easy
273

Integer to English Words

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

Hard
405

Convert a Number to Hexadecimal

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

Easy
412

Fizz Buzz

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

Easy
415

Add Strings

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

Easy
504

Base 7

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

Easy
537

Complex Number Multiplication

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

Medium
564

Find the Closest Palindrome

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

Hard
592

Fraction Addition and Subtraction

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

Medium
640

Solve the Equation

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

Medium
899

Orderly Queue

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

Hard
906

Super Palindromes

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

Hard
972

Equal Rational Numbers

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

Hard
1041

Robot Bounded In Circle

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

Medium
1071

Greatest Common Divisor of Strings

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

Easy
1154

Day of the Year

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

Easy
1360

Number of Days Between Two Dates

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

Easy
1447

Simplified Fractions

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

Medium
1513

Number of Substrings With Only 1s

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

Medium
1573

Number of Ways to Split a String

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

Medium
1759

Count Number of Homogenous Substrings

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

Medium

swap_vertScroll inside the bank to auto-load more

Continue by topic

Once the pattern itself feels familiar, move back into concrete topic hubs so you can separate the pattern from the changing problem context.

route

Guided Practice Path

AI recommends problems by your level and tracks your progress.

Start Guided Patharrow_forward
Math plus String LeetCode Pattern: 35 Solutions