← back

Math

575 questions · 0 seen

All Math problems

Problems

2 Add Two Numbers
7 Reverse Integer
9 Palindrome Number
12 Integer to Roman
13 Roman to Integer
29 Divide Two Integers
43 Multiply Strings
48 Rotate Image
50 Pow(x, n)
60 Permutation Sequence
62 Unique Paths
66 Plus One
67 Add Binary
69 Sqrt(x)
70 Climbing Stairs
89 Gray Code
96 Unique Binary Search Trees
149 Max Points on a Line
150 Evaluate Reverse Polish Notation
166 Fraction to Recurring Decimal
168 Excel Sheet Column Title
171 Excel Sheet Column Number
172 Factorial Trailing Zeroes
189 Rotate Array
202 Happy Number
204 Count Primes
223 Rectangle Area
224 Basic Calculator
227 Basic Calculator II
231 Power of Two
233 Number of Digit One
241 Different Ways to Add Parentheses
258 Add Digits
263 Ugly Number
264 Ugly Number II
268 Missing Number
273 Integer to English Words
279 Perfect Squares
282 Expression Add Operators
292 Nim Game
313 Super Ugly Number
319 Bulb Switcher
326 Power of Three
335 Self Crossing
342 Power of Four
343 Integer Break
357 Count Numbers with Unique Digits
365 Water and Jug Problem
367 Valid Perfect Square
368 Largest Divisible Subset
371 Sum of Two Integers
372 Super Pow
375 Guess Number Higher or Lower II
380 Insert Delete GetRandom O(1)
381 Insert Delete GetRandom O(1) - Duplicates allowed
382 Linked List Random Node
384 Shuffle an Array
390 Elimination Game
391 Perfect Rectangle
396 Rotate Function
398 Random Pick Index
400 Nth Digit
405 Convert a Number to Hexadecimal
412 Fizz Buzz
415 Add Strings
423 Reconstruct Original Digits from English
441 Arranging Coins
445 Add Two Numbers II
447 Number of Boomerangs
453 Minimum Moves to Equal Array Elements
458 Poor Pigs
462 Minimum Moves to Equal Array Elements II
464 Can I Win
470 Implement Rand10() Using Rand7()
477 Total Hamming Distance
478 Generate Random Point in a Circle
479 Largest Palindrome Product
483 Smallest Good Base
486 Predict the Winner
492 Construct the Rectangle
497 Random Point in Non-overlapping Rectangles
504 Base 7
507 Perfect Number
509 Fibonacci Number
519 Random Flip Matrix
523 Continuous Subarray Sum
528 Random Pick with Weight
537 Complex Number Multiplication
539 Minimum Time Difference
553 Optimal Division
556 Next Greater Element III
564 Find the Closest Palindrome
587 Erect the Fence
592 Fraction Addition and Subtraction
593 Valid Square
598 Range Addition II
628 Maximum Product of Three Numbers
633 Sum of Square Numbers
640 Solve the Equation
650 2 Keys Keyboard
667 Beautiful Arrangement II
668 Kth Smallest Number in Multiplication Table
670 Maximum Swap
672 Bulb Switcher II
679 24 Game
710 Random Pick with Blacklist (PRO)
728 Self Dividing Numbers
738 Monotone Increasing Digits
754 Reach a Number
762 Prime Number of Set Bits in Binary Representation
770 Basic Calculator IV
775 Global and Local Inversions
779 K-th Symbol in Grammar
780 Reaching Points
781 Rabbits in Forest
782 Transform to Chessboard
788 Rotated Digits
789 Escape The Ghosts
793 Preimage Size of Factorial Zeroes Function
805 Split Array With Same Average
808 Soup Servings
810 Chalkboard XOR Game
812 Largest Triangle Area
829 Consecutive Numbers Sum
836 Rectangle Overlap
837 New 21 Game
840 Magic Squares In Grid
843 Guess the Word
858 Mirror Reflection
866 Prime Palindrome
869 Reordered Power of 2
877 Stone Game
878 Nth Magical Number
883 Projection Area of 3D Shapes
887 Super Egg Drop
891 Sum of Subsequence Widths
892 Surface Area of 3D Shapes
899 Orderly Queue
902 Numbers At Most N Given Digit Set
906 Super Palindromes
908 Smallest Range I
910 Smallest Range II
913 Cat and Mouse
914 X of a Kind in a Deck of Cards
920 Number of Music Playlists
927 Three Equal Parts
932 Beautiful Array
939 Minimum Area Rectangle
952 Largest Component Size by Common Factor
957 Prison Cells After N Days
963 Minimum Area Rectangle II
964 Least Operators to Express Number
970 Powerful Integers
972 Equal Rational Numbers
973 K Closest Points to Origin
976 Largest Perimeter Triangle
989 Add to Array-Form of Integer
991 Broken Calculator
996 Number of Squareful Arrays
1006 Clumsy Factorial
1012 Numbers With Repeated Digits
1015 Smallest Integer Divisible by K
1017 Convert to Base -2
1025 Divisor Game
1030 Matrix Cells in Distance Order
1033 Moving Stones Until Consecutive
1037 Valid Boomerang
1040 Moving Stones Until Consecutive II
1041 Robot Bounded In Circle
1071 Greatest Common Divisor of Strings
1073 Adding Two Negabinary Numbers
1093 Statistics from a Large Sample
1103 Distribute Candies to People
1104 Path In Zigzag Labelled Binary Tree
1131 Maximum of Absolute Value Expression
1137 N-th Tribonacci Number
1140 Stone Game II
1154 Day of the Year
1175 Prime Arrangements
1185 Day of the Week
1201 Ugly Number III
1217 Minimum Cost to Move Chips to The Same Position
1227 Airplane Seat Assignment Probability
1232 Check If It Is a Straight Line
1237 Find Positive Integer Solution for a Given Equation
1238 Circular Permutation in Binary Representation
1247 Minimum Swaps to Make Strings Equal
1248 Count Number of Nice Subarrays
1250 Check If It Is a Good Array
1252 Cells with Odd Values in a Matrix
1266 Minimum Time Visiting All Points
1276 Number of Burgers with No Waste of Ingredients
1281 Subtract the Product and Sum of Digits of an Integer
1290 Convert Binary Number in a Linked List to Integer
1295 Find Numbers with Even Number of Digits
1304 Find N Unique Integers Sum up to Zero
1307 Verbal Arithmetic Puzzle
1317 Convert Integer to the Sum of Two No-Zero Integers
1323 Maximum 69 Number
1330 Reverse Subarray To Maximize Array Value
1342 Number of Steps to Reduce a Number to Zero
1344 Angle Between Hands of a Clock
1352 Product of the Last K Numbers
1359 Count All Valid Pickup and Delivery Options
1360 Number of Days Between Two Dates
1362 Closest Divisors
1363 Largest Multiple of Three
1390 Four Divisors
1399 Count Largest Group
1401 Circle and Rectangle Overlapping
1406 Stone Game III
1414 Find the Minimum Number of Fibonacci Numbers Whose Sum Is K
1432 Max Difference You Can Get From Changing an Integer
1442 Count Triplets That Can Form Two Arrays of Equal XOR
1447 Simplified Fractions
1453 Maximum Number of Darts Inside of a Circular Dartboard
1467 Probability of a Two Boxes Having The Same Number of Distinct Balls
1478 Allocate Mailboxes
1486 XOR Operation in an Array
1492 The kth Factor of n
1510 Stone Game IV
1512 Number of Good Pairs
1513 Number of Substrings With Only 1s
1515 Best Position for a Service Centre
1518 Water Bottles
1523 Count Odd Numbers in an Interval Range
1524 Number of Sub-arrays With Odd Sum
1551 Minimum Operations to Make Array Equal
1561 Maximum Number of Coins You Can Get
1563 Stone Game V
1569 Number of Ways to Reorder Array to Get Same BST
1573 Number of Ways to Split a String
1577 Number of Ways Where Square of Number Is Equal to Product of Two Numbers
1588 Sum of All Odd Length Subarrays
1610 Maximum Number of Visible Points
1611 Minimum One Bit Operations to Make Integers Zero
1621 Number of Sets of K Non-Overlapping Line Segments
1622 Fancy Sequence
1627 Graph Connectivity With Threshold
1641 Count Sorted Vowel Strings
1643 Kth Smallest Instructions
1648 Sell Diminishing-Valued Colored Balls
1680 Concatenation of Consecutive Binary Numbers
1685 Sum of Absolute Differences in a Sorted Array
1686 Stone Game VI
1688 Count of Matches in Tournament
1690 Stone Game VII
1716 Calculate Money in Leetcode Bank
1728 Cat and Mouse II
1735 Count Ways to Make Array With Product
1739 Building Boxes
1742 Maximum Number of Balls in a Box
1753 Maximum Score From Removing Stones
1759 Count Number of Homogenous Substrings
1766 Tree of Coprimes
1776 Car Fleet II
1780 Check if Number is a Sum of Powers of Three
1799 Maximize Score After N Operations
1802 Maximum Value at a Given Index in a Bounded Array
1806 Minimum Number of Operations to Reinitialize a Permutation
1808 Maximize Number of Nice Divisors
1812 Determine Color of a Chessboard Square
1814 Count Nice Pairs in an Array (PRO)
1819 Number of Different Subsequences GCDs
1822 Sign of the Product of an Array
1823 Find the Winner of the Circular Game
1828 Queries on Number of Points Inside a Circle
1830 Minimum Number of Operations to Make String Sorted
1835 Find XOR Sum of All Pairs Bitwise AND
1837 Sum of Digits in Base K
1840 Maximum Building Height
1860 Incremental Memory Leak
1862 Sum of Floored Pairs
1863 Sum of All Subset XOR Totals
1866 Number of Ways to Rearrange Sticks With K Sticks Visible
1872 Stone Game VIII
1878 Get Biggest Three Rhombus Sums in a Grid
1884 Egg Drop With 2 Eggs and N Floors
1896 Minimum Cost to Change the Final Value of Expression
1903 Largest Odd Number in String (PRO)
1904 The Number of Full Rounds You Have Played
1916 Count Ways to Build Rooms in an Ant Colony
1922 Count Good Numbers
1925 Count Square Sum Triples (PRO)
1927 Sum Game
1952 Three Divisors
1954 Minimum Garden Perimeter to Collect Enough Apples
1969 Minimum Non-Zero Product of the Array Elements
1979 Find Greatest Common Divisor of Array
1994 The Number of Good Subsets
1998 GCD Sort of an Array (PRO)
2001 Number of Pairs of Interchangeable Rectangles
2019 The Score of Students Solving Math Expression
2028 Find Missing Observations
2029 Stone Game IX
2033 Minimum Operations to Make a Uni-Value Grid
2038 Remove Colored Pieces if Both Neighbors are the Same Color
2048 Next Greater Numerically Balanced Number
2063 Vowels of All Substrings
2081 Sum of k-Mirror Numbers
2101 Detonate the Maximum Bombs
2110 Number of Smooth Descent Periods of a Stock
2117 Abbreviating the Product of a Range
2119 A Number After a Double Reversal
2125 Number of Laser Beams in a Bank
2139 Minimum Moves to Reach Target Score
2147 Number of Ways to Divide a Long Corridor
2160 Minimum Sum of Four Digit Number After Splitting Digits
2162 Minimum Cost to Set Cooking Time
2165 Smallest Value of the Rearranged Number
2169 Count Operations to Obtain Zero
2177 Find Three Consecutive Integers That Sum to a Given Number
2178 Maximum Split of Positive Even Integers
2180 Count Integers With Even Digit Sum
2183 Count Array Pairs Divisible by K
2195 Append K Integers With Minimal Sum
2197 Replace Non-Coprime Numbers in Array
2217 Find Palindrome With Fixed Length
2221 Find Triangular Sum of an Array
2235 Add Two Integers
2240 Number of Ways to Buy Pens and Pencils
2249 Count Lattice Points Inside a Circle
2266 Count Number of Texts
2269 Find the K-Beauty of a Number
2280 Minimum Lines to Represent a Line Chart
2310 Sum of Numbers With Units Digit K
2317 Maximum XOR After Operations
2338 Count the Number of Ideal Arrays
2344 Minimum Deletions to Make Array Divisible
2348 Number of Zero-Filled Subarrays
2358 Maximum Number of Groups Entering a Competition
2364 Count Number of Bad Pairs
2366 Minimum Replacements to Sort the Array
2376 Count Special Integers
2396 Strictly Palindromic Number
2400 Number of Ways to Reach a Position After Exactly k Steps
2409 Count Days Spent Together
2413 Smallest Even Multiple
2427 Number of Common Factors
2440 Create Components With Same Value
2442 Count Number of Distinct Integers After Reverse Operations
2443 Sum of Number and Its Reverse
2447 Number of Subarrays With GCD Equal to K
2455 Average Value of Even Numbers That Are Divisible by Three
2457 Minimum Addition to Make Integer Beautiful
2469 Convert the Temperature
2470 Number of Subarrays With LCM Equal to K
2481 Minimum Cuts to Divide a Circle
2485 Find the Pivot Integer
2507 Smallest Value After Replacing With Sum of Prime Factors
2513 Minimize the Maximum of Two Arrays
2514 Count Anagrams
2520 Count the Digits That Divide a Number
2521 Distinct Prime Factors of Product of Array
2523 Closest Prime Numbers in Range
2525 Categorize Box According to Criteria
2527 Find Xor-Beauty of Array
2535 Difference Between Element Sum and Digit Sum of an Array
2541 Minimum Operations to Make Array Equal II
2543 Check if Point Is Reachable
2544 Alternating Digit Sum
2549 Count Distinct Numbers on Board
2550 Count Collisions of Monkeys on a Polygon
2566 Maximum Difference by Remapping a Digit
2572 Count the Number of Square-Free Subsets
2575 Find the Divisibility Array of a String
2578 Split With Minimum Sum
2579 Count Total Number of Colored Cells
2582 Pass the Pillow
2584 Split the Array to Make Coprime Products
2591 Distribute Money to Maximum Children
2597 The Number of Beautiful Subsets
2598 Smallest Missing Non-negative Integer After Operations (PRO)
2600 K Items With the Maximum Sum
2601 Prime Subtraction Operation
2607 Make K-Subarray Sums Equal
2614 Prime In Diagonal
2651 Calculate Delayed Arrival Time
2652 Sum Multiples
2654 Minimum Number of Operations to Make All Array Elements Equal to 1
2681 Power of Heroes
2698 Find the Punishment Number of an Integer
2709 Greatest Common Divisor Traversal (PRO)
2719 Count of Integers
2729 Check if The Number is Fascinating (PRO)
2739 Total Distance Traveled
2745 Construct the Longest New String
2748 Number of Beautiful Pairs
2750 Ways to Split Array Into Good Subarrays
2761 Prime Pairs With Target Sum
2769 Find the Maximum Achievable Number
2790 Maximum Number of Groups With Increasing Length
2806 Account Balance After Rounded Purchase
2807 Insert Greatest Common Divisors in Linked List
2816 Double a Number Represented as a Linked List
2818 Apply Operations to Maximize Score
2827 Number of Beautiful Integers in the Range
2829 Determine the Minimum Sum of a k-avoiding Array
2834 Find the Minimum Possible Sum of a Beautiful Array
2842 Count K-Subsequences of a String With Maximum Beauty
2843 Count Symmetric Integers
2844 Minimum Operations to Make a Special Number
2849 Determine if a Cell Is Reachable at a Given Time
2851 String Transformation
2862 Maximum Element-Sum of a Complete Subset of Indices
2864 Maximum Odd Binary Number
2867 Count Valid Paths in a Tree
2894 Divisible and Non-divisible Sums Difference
2928 Distribute Candies Among Children I
2929 Distribute Candies Among Children II
2930 Number of Strings Which Can Be Rearranged to Contain Substring
2939 Maximum Xor Product
2946 Matrix Similarity After Cyclic Shifts
2947 Count Beautiful Substrings I
2949 Count Beautiful Substrings II
2954 Count the Number of Infection Sequences
2961 Double Modular Exponentiation
2963 Count the Number of Good Partitions
2965 Find Missing and Repeated Values
2967 Minimum Cost to Make Array Equalindromic
2999 Count the Number of Powerful Integers
3001 Minimum Moves to Capture The Queen
3007 Maximum Number That Sum of the Prices Is Less Than or Equal to K
3012 Minimize Length of Array Using Operations
3014 Minimum Number of Pushes to Type Word I
3021 Alice and Bob Playing Flower Game
3024 Type of Triangle
3025 Find the Number of Ways to Place People I
3027 Find the Number of Ways to Place People II
3044 Most Frequent Prime
3047 Find the Largest Area of Square Inside Two Rectangles
3079 Find the Sum of Encrypted Integers
3084 Count Substrings Starting and Ending with Given Character
3091 Apply Operations to Make Sum of Array Greater Than or Equal to k
3099 Harshad Number
3100 Water Bottles II
3101 Count Alternating Subarrays
3102 Minimize Manhattan Distances
3115 Maximum Prime Difference
3116 Kth Smallest Amount With Single Denomination Combination
3128 Right Triangles
3153 Sum of Digit Differences of All Pairs
3154 Find Number of Ways to Reach the K-th Stair
3178 Find the Child Who Has the Ball After K Seconds
3179 Find the N-th Value After K Seconds
3190 Find Minimum Operations to Make All Elements Divisible by Three
3222 Find the Winning Player in Coin Game
3227 Vowels Game in a String
3232 Find if Digit Game Can Be Won
3233 Find the Count of Numbers Which Are Not Special
3235 Check if the Rectangle Corner Is Reachable
3250 Find the Count of Monotonic Pairs I
3251 Find the Count of Monotonic Pairs II
3260 Find the Largest Palindrome Divisible by K
3264 Final Array State After K Multiplication Operations I
3270 Find the Key of the Numbers
3272 Find the Count of Good Integers
3274 Check if Two Chessboard Squares Have the Same Color
3280 Convert Date to Binary
3283 Maximum Number of Moves to Kill All Pawns
3289 The Two Sneaky Numbers of Digitville
3296 Minimum Number of Seconds to Make Mountain Height Zero
3300 Minimum Element After Replacement With Digit Sum
3304 Find the K-th Character in String Game I
3307 Find the K-th Character in String Game II
3312 Sorted GCD Pair Queries (PRO)
3317 Find the Number of Possible Ways for an Event
3326 Minimum Division Operations to Make Array Non Decreasing
3334 Find the Maximum Factor Score of Array
3335 Total Characters in String After Transformations I
3336 Find the Number of Subsequences With Equal GCD
3337 Total Characters in String After Transformations II
3343 Count Number of Balanced Permutations
3345 Smallest Divisible Digit Product I
3348 Smallest Divisible Digit Product II
3352 Count K-Reducible Numbers Less Than N
3360 Stone Removal Game
3370 Smallest Number With All Set Bits
3377 Digit Operations to Make Two Integers Equal
3378 Count Connected Components in LCM Graph
3380 Maximum Area Rectangle With Point Constraints I
3382 Maximum Area Rectangle With Point Constraints II
3395 Subsequences with a Unique Middle Mode I
3404 Count Special Subsequences
3405 Count the Number of Arrays with K Matching Adjacent Elements
3411 Maximum Subarray With Equal Products
3426 Manhattan Distances of All Arrangements of Pieces
3428 Maximum and Minimum Sums of at Most Size K Subsequences
3430 Maximum and Minimum Sums of at Most Size K Subarrays
3432 Count Partitions with Even Sum Difference
3433 Count Mentions Per User
3443 Maximum Manhattan Distance After K Changes (PRO)
3444 Minimum Increments for Target Multiples in an Array
3461 Check If Digits Are Equal in String After Operations I
3463 Check If Digits Are Equal in String After Operations II
3464 Maximize the Distance Between Points on a Square
3468 Find the Number of Copy Arrays
3470 Permutations IV
3492 Maximum Containers on a Ship
3495 Minimum Operations to Make Array Elements Zero
3505 Minimum Operations to Make Elements Within K Subarrays Equal
3512 Minimum Operations to Make Array Sum Divisible by K
3513 Number of Unique XOR Triplets I
3514 Number of Unique XOR Triplets II
3516 Find Closest Person
3518 Smallest Palindromic Rearrangement II
3519 Count Numbers with Non-Decreasing Digits
3524 Find X Value of Array I
3525 Find X Value of Array II
3536 Maximum Product of Two Digits
3539 Find Sum of Array Product of Magical Sequences
3547 Maximum Sum of Edge Values in a Graph
3550 Smallest Index With Digit Sum Equal to Index
3556 Sum of Largest Prime Substrings
3558 Number of Ways to Assign Edge Weights I
3559 Number of Ways to Assign Edge Weights II
3560 Find Minimum Log Transportation Cost
3569 Maximize Count of Distinct Primes After Split
3574 Maximize Subarray GCD Score
3577 Count the Number of Computer Unlocking Permutations
3588 Find Maximum Area of a Triangle
3589 Count Prime-Gap Balanced Subarrays
3591 Check if Any Element Has Prime Frequency
3602 Hexadecimal and Hexatrigesimal Conversion
3605 Minimum Stability Factor of Array
3609 Minimum Moves to Reach Target in Grid
3618 Split Array by Prime Indices
3621 Number of Integers With Popcount-Depth Equal to K I
3622 Check Divisibility by Digit Sum and Product
3623 Count Number of Trapezoids I
3625 Count Number of Trapezoids II
3627 Maximum Median Sum of Subsequences of Size 3
3629 Minimum Jumps to Reach End via Prime Teleportation
3630 Partition Array for Maximum XOR and AND
3648 Minimum Sensors to Cover Grid
3649 Number of Perfect Pairs
3658 GCD of Odd and Even Sums
3663 Find The Least Frequent Digit
3666 Minimum Operations to Equalize Binary String
3669 Balanced K-Factor Decomposition
3671 Sum of Beautiful Subsequences
3677 Count Binary Palindromic Numbers
3680 Generate Schedule
3681 Maximum XOR of Subsequences
3697 Compute Decimal Representation
3700 Number of ZigZag Arrays II
3704 Count No-Zero Pairs That Sum to N
3715 Sum of Perfect Square Ancestors
3723 Maximize Sum of Squares of Digits
3725 Count Ways to Choose Coprime Integers from Rows
3726 Remove Zeros in Decimal Representation
3732 Maximum Product of Three Elements After One Replacement
3733 Minimum Time to Complete All Deliveries
3736 Minimum Moves to Equal Array Elements III
3747 Count Distinct Integers After Removing Zeros
3750 Minimum Number of Flips to Reverse Binary String
3751 Total Waviness of Numbers in Range I
3752 Lexicographically Smallest Negated Permutation that Sums to Target
3753 Total Waviness of Numbers in Range II
3754 Concatenate Non-Zero Digits and Multiply by Sum I
3756 Concatenate Non-Zero Digits and Multiply by Sum II
3757 Number of Effective Subsequences
3761 Minimum Absolute Distance Between Mirror Pairs
3762 Minimum Operations to Equalize Subarrays
3765 Complete Prime Number
3770 Largest Prime from Consecutive Prime Sum
3782 Last Remaining Integer After Alternating Deletion Operations (PRO)
3783 Mirror Distance of an Integer
3789 Minimum Cost to Acquire Required Items
3790 Smallest All-Ones Multiple
3805 Count Caesar Cipher Pairs
3821 Find Nth Smallest Integer With K One Bits
3828 Final Element After Subarray Deletions
3848 Check Digitorial Permutation
3850 Count Sequences to K