Amazon Math Questions

299 math problems asked at Amazon interviews

Easy (97)Medium (150)Hard (52)

Questions

TitleDifficulty
Add Two NumbersMedium
Palindrome NumberEasy
Climbing StairsEasy
Rotate ImageMedium
Roman to IntegerEasy
Unique PathsMedium
Insert Delete GetRandom O(1)Medium
Reverse IntegerMedium
Rotate ArrayMedium
Sqrt(x)Easy
Missing NumberEasy
Pow(x, n)Medium
Integer to RomanMedium
Basic CalculatorHard
Integer to English WordsHard
Plus OneEasy
Basic Calculator IIMedium
Happy NumberEasy
Fibonacci NumberEasy
K Closest Points to OriginMedium
Evaluate Reverse Polish NotationMedium
Add BinaryEasy
Count PrimesMedium
Fizz BuzzEasy
Random Pick with WeightMedium
The kth Factor of nMedium
Minimum Time to Complete All DeliveriesMedium
Divide Two IntegersMedium
Find Triangular Sum of an ArrayMedium
Add Two IntegersEasy
Greatest Common Divisor of StringsEasy
Power of TwoEasy
Count Good NumbersMedium
Find Missing and Repeated ValuesEasy
Lexicographically Smallest Negated Permutation that Sums to TargetMedium
Sum of Two IntegersMedium
Minimum Number of Primes to Sum to TargetMedium
Most Expensive Item That Can Not Be BoughtMedium
Find the Number of Possible Ways for an EventHard
Add DigitsEasy
Permutation SequenceHard
Rotate FunctionMedium
Gray CodeMedium
Next Greater Element IIIMedium
Maximum Number of Groups With Increasing LengthHard
Predict the WinnerMedium
Distribute Candies Among Children IIMedium
Angle Between Hands of a ClockMedium
Multiply StringsMedium
Sell Diminishing-Valued Colored BallsMedium
Excel Sheet Column TitleEasy
Add StringsEasy
Unique Binary Search TreesMedium
Different Ways to Add ParenthesesMedium
Sum of All Subset XOR TotalsEasy
Design an Expression Tree With Evaluate FunctionMedium
Perfect SquaresMedium
GCD Sort of an ArrayHard
Strictly Palindromic NumberMedium
Allocate MailboxesHard
Arranging CoinsEasy
Concatenation of Consecutive Binary NumbersMedium
Continuous Subarray SumMedium
Count Beautiful Substrings IMedium
Minimum Sum of Four Digit Number After Splitting DigitsEasy
Orderly QueueHard
Number of Smooth Descent Periods of a StockMedium
Largest Odd Number in StringEasy
Bulb SwitcherMedium
Max Points on a LineHard
Ugly NumberEasy
Number of Digit OneHard
Check If Digits Are Equal in String After Operations IEasy
Split With Minimum SumEasy
Find Missing ObservationsMedium
Find the Divisibility Array of a StringMedium
Number of Laser Beams in a BankMedium
Solve the EquationMedium
Count Number of TextsMedium
Power of ThreeEasy
Insert Delete GetRandom O(1) - Duplicates allowedHard
Prison Cells After N DaysMedium
Minimum Number of Pushes to Type Word IEasy
Optimal DivisionMedium
Replace Non-Coprime Numbers in ArrayHard
Minimum Garden Perimeter to Collect Enough ApplesMedium
Double a Number Represented as a Linked ListMedium
Find Number of Ways to Reach the K-th StairHard
Sum of Number and Its ReverseMedium
Monotone Increasing DigitsMedium
Handshakes That Don't CrossHard
Closest DivisorsMedium
Magic Squares In GridMedium
Largest Divisible SubsetMedium
2 Keys KeyboardMedium
Maximum SwapMedium
Prime Number of Set Bits in Binary RepresentationEasy
Distribute Candies Among Children IEasy
Find the Pivot IntegerEasy
Complex Number MultiplicationMedium
Digit Count in RangeHard
Sum of Digits in the Minimum NumberEasy
Find Xor-Beauty of ArrayMedium
Number of Days in a MonthEasy
Armstrong NumberEasy
Count Beautiful Substrings IIHard
Distribute Candies Among Children IIIHard
Count the Number of K-Free SubsetsMedium
Number of Sets of K Non-Overlapping Line SegmentsMedium
Add Two Polynomials Represented as Linked ListsMedium
Largest Multiple of ThreeHard
Prime ArrangementsEasy
Append K Integers With Minimal SumMedium
Count Numbers With Unique Digits IIEasy
Global and Local InversionsMedium
Count Ways to Make Array With ProductHard
Numbers At Most N Given Digit SetHard
Minimum Stability Factor of ArrayHard
Base 7Easy
Maximum Product of Three NumbersEasy
Excel Sheet Column NumberEasy
Number of Zero-Filled SubarraysMedium
Guess the WordHard
Maximum Median Sum of Subsequences of Size 3Medium
Minimize Array Sum Using Divisible ReplacementsMedium
Find the K-th Character in String Game IEasy
Sum of Square NumbersMedium
N-th Tribonacci NumberEasy
Nth Magical NumberHard
Elimination GameMedium
Number of Good PairsEasy
Valid Perfect SquareEasy
Ugly Number IIMedium
Count Number of Bad PairsMedium
New 21 GameMedium
Soup ServingsMedium
Add Two Numbers IIMedium
Basic Calculator IIIHard
Find N Unique Integers Sum up to ZeroEasy
Find the Maximum Achievable NumberEasy
Factorial Trailing ZeroesMedium
Minimum Sensors to Cover GridMedium
Sum of GCD of Formed PairsMedium
Total Waviness of Numbers in Range IMedium
Find the Winner of the Circular GameMedium
Sum of Absolute Differences in a Sorted ArrayMedium
Smallest Even MultipleEasy
Detonate the Maximum BombsMedium
Count Number of Nice SubarraysMedium
Nth DigitMedium
Perfect NumberEasy
Power of FourEasy
Find the Closest PalindromeHard
Reordered Power of 2Medium
Total Characters in String After Transformations IMedium
Minimum Time DifferenceMedium
Robot Bounded In CircleMedium
Find Numbers with Even Number of DigitsEasy
Nim GameEasy
Add to Array-Form of IntegerEasy
Can I WinMedium
K-th Symbol in GrammarMedium
Rabbits in ForestMedium
Divisor GameEasy
Water and Jug ProblemMedium
Number of Sub-arrays With Odd SumMedium
Stone Game IIMedium
Self Dividing NumbersEasy
Fraction to Recurring DecimalMedium
Water BottlesEasy
Find the Punishment Number of an IntegerMedium
Max Difference You Can Get From Changing an IntegerMedium
Find the Number of Ways to Place People IMedium
Minimum Moves to Equal Array ElementsMedium
Reach a NumberMedium
Check if Number is a Sum of Powers of ThreeMedium
Count Total Number of Colored CellsMedium
Number of Steps to Reduce a Number to ZeroEasy
Convert Integer to the Sum of Two No-Zero IntegersEasy
Smallest Missing Non-negative Integer After OperationsMedium
Minimum Absolute Distance Between Mirror PairsMedium
Rotated DigitsMedium
Total Waviness of Numbers in Range IIHard
Rectangle AreaMedium
Super Ugly NumberMedium
Integer BreakMedium
Smallest Range IIMedium
Largest Perimeter TriangleEasy
Convert Binary Number in a Linked List to IntegerEasy
Product of the Last K NumbersMedium
Count of Matches in TournamentEasy
Check if the Rectangle Corner Is ReachableHard
Prime PalindromeMedium
Closest Prime Numbers in RangeMedium
A Number After a Double ReversalEasy
Divisible and Non-divisible Sums DifferenceEasy
Mirror ReflectionMedium
Get Biggest Three Rhombus Sums in a GridMedium
Super PowMedium
Check If It Is a Straight LineEasy
Reaching PointsHard
Best Meeting PointHard
Minimum Cuts to Divide a CircleEasy
Rectangle OverlapEasy
Expression Add OperatorsHard
Minimum Operations to Equalize Binary StringHard
Largest Triangle AreaEasy
Number of Ways to Assign Edge Weights IMedium
Minimum Jumps to Reach End via Prime TeleportationMedium
Minimum Operations to Make a Uni-Value GridMedium
Fancy SequenceHard
Perfect RectangleHard
Minimum Number of Seconds to Make Mountain Height ZeroMedium
Count Symmetric IntegersEasy
Random Pick IndexMedium
Super Egg DropHard
Number of Days Between Two DatesEasy
Maximum 69 NumberEasy
Calculate Money in Leetcode BankEasy
Check if Two Chessboard Squares Have the Same ColorEasy
Convert a Number to HexadecimalEasy
Number of Pairs of Interchangeable RectanglesMedium
Construct the RectangleEasy
Count the Number of Ideal ArraysHard
Smallest Number With All Set BitsEasy
The Two Sneaky Numbers of DigitvilleEasy
Count Collisions of Monkeys on a PolygonMedium
Find the K-th Character in String Game IIHard
Find Closest PersonEasy
Count Largest GroupEasy
Minimum Number of Operations to Make All Array Elements Equal to 1Medium
Minimum Operations to Make Array Sum Divisible by KEasy
Count Operations to Obtain ZeroEasy
Plus One Linked ListMedium
Shuffle an ArrayMedium
Beautiful ArrayMedium
Convert the TemperatureEasy
Minimum Moves to Equal Array Elements IIMedium
Surface Area of 3D ShapesEasy
Smallest Integer Divisible by KMedium
Split Array With Same AverageHard
Count Odd Numbers in an Interval RangeEasy
Minimum Time Visiting All PointsEasy
Ugly Number IIIMedium
Maximum and Minimum Sums of at Most Size K SubsequencesMedium
Count the Digits That Divide a NumberEasy
Find Minimum Operations to Make All Elements Divisible by ThreeEasy
Car Fleet IIHard
Sign of the Product of an ArrayEasy
Subtract the Product and Sum of Digits of an IntegerEasy
Missing Number In Arithmetic ProgressionEasy
Matrix Similarity After Cyclic ShiftsEasy
Final Element After Subarray DeletionsMedium
Minimum Deletions to Make Array DivisibleHard
Minimum Cost to Split into OnesMedium
Maximum Number of Coins You Can GetMedium
Sum of All Odd Length SubarraysEasy
The Number of Beautiful SubsetsMedium
Difference Between Element Sum and Digit Sum of an ArrayEasy
Maximum Odd Binary NumberEasy
Final Array State After K Multiplication Operations IEasy
Random Pick with BlacklistHard
Minimum Division Operations to Make Array Non DecreasingMedium
Prime Subtraction OperationMedium
Manhattan Distances of All Arrangements of PiecesHard
Maximum XOR After OperationsMedium
Alice and Bob Playing Flower GameMedium
Count the Number of Arrays with K Matching Adjacent ElementsHard
Number of Common FactorsEasy
Clumsy FactorialMedium
Count the Number of Computer Unlocking PermutationsMedium
Range Addition IIEasy
Minimum Cost to Move Chips to The Same PositionEasy
Kth Smallest InstructionsHard
Minimum Moves to Reach Target ScoreMedium
Maximum Number of Visible PointsHard
Find the Largest Palindrome Divisible by KHard
Maximum Difference by Remapping a DigitEasy
Balanced K-Factor DecompositionMedium
Smallest Good BaseHard
Alternating Digit SumEasy
Erect the FenceHard
Water Bottles IIMedium
Sum of Perfect Square AncestorsHard
Minimum Operations to Make Array EqualMedium
Count Partitions with Even Sum DifferenceEasy
Maximum Building HeightHard
Number of ZigZag Arrays IIHard
Minimum Non-Zero Product of the Array ElementsMedium
Four DivisorsMedium
Number of Substrings With Only 1sMedium
Minimize the Maximum of Two ArraysMedium
Find Greatest Common Divisor of ArrayEasy
Vowels Game in a StringMedium
Minimum Addition to Make Integer BeautifulMedium
Stone GameMedium
Number of Subarrays With LCM Equal to KMedium
Kth Smallest Number in Multiplication TableHard
Number of Ways to Assign Edge Weights IIHard

Showing 299 questions