Math practice problems
Integer arithmetic that has to be right — rounding, percentages, money that must still add up. A concept: the material itself — what it is, and what it costs you to use. 117 problems in the bank train it, each with a worked example, a hint and a reference solution.
- Math
- Strings
- Arrays
- Hash maps
- Sorting
- Parsing
- Two pointers
- Sliding window
- Prefix sums
- Stacks
- Binary search
- Intervals
- Grids
- Greedy
- Recursion
- Simulation
- Bit manipulation
117 problems
- Factorialeasy
- Nth Fibonacci numbereasy
- Sum of digitseasy
- Apply a promo percentageeasy
- Discount, but never below the flooreasy
- Loyalty points for a basketeasy
- Week-on-week price changeeasy
- Will this fit in the bayeasy
- When to reorder a parteasy
- What the shelf is wortheasy
- Total a basket that came off a queueeasy
- Does this basket ship freeeasy
- How much of this can still be refundedeasy
- Is it a leap yeareasy
- How many days in this montheasy
- Defects per million partseasy
- How many batches to runeasy
- What share of requests failedeasy
- Keep a value inside its rangeeasy
- Is it a power of twoeasy
- Greatest common divisoreasy
- Steps to reach oneeasy
- Count the set bitseasy
- What does this parcel cost to sendeasy
- Split a load into the fewest parcelseasy
- Is the order inside the same-day windoweasy
- Cost of a planned routeeasy
- How many breaks does the shift needeasy
- Sum the invoice line itemseasy
- Compute the late payment feeeasy
- Calculate tax on a shipping chargeeasy
- How much is still owedeasy
- Payment method surchargeeasy
- Clamp a day into a billing termeasy
- Compute the final charge on an ordereasy
- Simple interest earnedeasy
- Balance after yearly compoundingeasy
- Convert between currencieseasy
- Variance from budgeteasy
- Months to reach a savings targeteasy
- Strip VAT out of a gross priceeasy
- Price per uniteasy
- Calculate combat damageeasy
- Count league pointseasy
- Score a dice paireasy
- Count tournament roundseasy
- Find a card after drawingeasy
- Score a word by letter positionseasy
- How much room is lefteasy
- Which slot does this time fall intoeasy
- How many minutes between two clock timeseasy
- How far apart are two scheduled dayseasy
- How long is this event in minuteseasy
- Machine uptime per thousandeasy
- Is maintenance due yeteasy
- Spares to keep for a fleeteasy
- Defects per thousand partseasy
- Good parts per run cycleeasy
- Which HTTP status family does a code belong toeasy
- Cache hit ratio in permilleeasy
- Pick the next server in round-robineasy
- Exponential backoff with a ceilingeasy
- How many pages does the result set needeasy
- Single-byte checksum of a payloadeasy
- How many hosts fit in a CIDR blockeasy
- The average so far, after every readingeasy
- Total the two diagonalseasy
- How many switches differeasy
- Extra pay for overnight hourshard
- Split a total into installmentshard
- Months to clear the loanhard
- Score dice pairshard
- Split a gross amount into net and VATmedium
- Price an order across volume tiersmedium
- Which pack size is the best valuemedium
- Format money for a receiptmedium
- Pick the coupon worth mostmedium
- Work out the shipping chargemedium
- Luhn check a card numbermedium
- Should this call be retriedmedium
- Split a bill without losing a kuruşmedium
- The middle of a set of readingsmedium
- Bucket some readingsmedium
- Which month grew the mostmedium
- Count the working days in a spanmedium
- Say a duration the way a person wouldmedium
- Read a duration a human typedmedium
- How busy was the linemedium
- Overall equipment effectivenessmedium
- The longest silence between heartbeatsmedium
- The p95 of a batch of latenciesmedium
- Verify a barcodemedium
- The middle of the listmedium
- Write a number in Roman numeralsmedium
- When does the order actually arrivemedium
- Which depot is closestmedium
- Parcel discount bandmedium
- Labour cost for the rostermedium
- Prorate an annual subscription refundmedium
- Early payment discountmedium
- Total cost of a subscription planmedium
- Refund for partially used servicemedium
- Profit margin in permillemedium
- How much survives a round tripmedium
- Average monthly figures for a yearmedium
- How many openings in the coming weeksmedium
- What does this meeting costmedium
- How many active weekdays in a spanmedium
- Average downtime per stopmedium
- Finished units in a shiftmedium
- Total hours a machine ranmedium
- How many machines are past calibrationmedium
- Classify a latency measurementmedium
- The whole-number square rootmedium
- How many ways across the yardmedium
- Raise to a power without the long way roundmedium
- Which is the lowest flag switched onmedium