Math and simulation
207 practice items · needed by 20 roles
Easy 66Medium 81Hard 60
Coding problems
- Add Two Binary Stringseasy
- Compare Release Versionseasy
- Count Differing Bitseasy
- Cumulative Totalseasy
- Dedupe Records by Keyeasy
- Do Two Hitboxes Collide?easy
- Equal Team Spliteasy
- Exponential Backoff Timelineeasy
- Fixed Deposit Maturity Amounteasy
- GST Invoice Totalseasy
- How Much Error Budget Is Left?easy
- Integer Square Rooteasy
- Latency Percentileseasy
- Missing Ticket Numbereasy
- Packet Checksum Byteeasy
- Paginate a Result Seteasy
- Parse a Query Stringeasy
- Print Queue Finish Timeeasy
- Repeated Digit Sumeasy
- Scorekeeper With Undoeasy
- Set-Bit Count Tableeasy
- Sort by Number of Set Bitseasy
- Split a Bill to the Centeasy
- The Unpaired Badgeeasy
- Warehouse Robot Moveseasy
- Add Business Days to a Datemedium
- Allocate Money by Ratiomedium
- Best Match by Cosine Similaritymedium
- Bit-Pack Telemetry Fieldsmedium
- Build a Threaded Comment Treemedium
- Card Velocity and Geo Fraud Rulesmedium
- Cell Colony Next Generationmedium
- Circle Elimination Ordermedium
- Convoy Collisionsmedium
- Count Primes Below Nmedium
- Deep Diff of Two JSON Objectsmedium
- Does a Cron Expression Match?medium
- Endpoint Report from Access Logsmedium
- Group By and Aggregatemedium
- Join Two Record Listsmedium
- K Closest Feature Vectorsmedium
- Loan EMI Schedulemedium
- Lone Value Among Triplesmedium
- One Step of K-Meansmedium
- Product of All Othersmedium
- Reconcile Bank and Ledgermedium
- Render a Template with Filtersmedium
- Simulate a Debounced Search Boxmedium
- Spiral Walk of a Gridmedium
- Stretches With a Divisible Totalmedium
- Token Bucket Rate Limitermedium
- Unflatten Dotted Keysmedium
- Virtual List Visible Rangemedium
- Count Queen Placementshard
- Debounce with a Maximum Waithard
- K-th Entry of a Times Tablehard
- Largest XOR of Two Numbershard
- Limit Order Book Matching Enginehard
- Merkle Root and Inclusion Proofhard
- Most Survey Points on One Linehard
- Next Run Time of a Cron Jobhard
- Parallel Install Waves for Packageshard
- Parse a CSV File into Recordshard
- Resolve Dependency Version Rangeshard
- Simulate a Snake Gamehard
- SLA Clock in Business Minuteshard
- Sum of Every Stretch Minimumhard
- Total Area Covered by Windowshard
Practice questions
- Remainder of a negative numbereasy
- Why 0.1 + 0.2 is not 0.3easy
- Storing rupee amounts safelyeasy
- GST inside an inclusive priceeasy
- How many buses are neededeasy
- Checking for a power of twoeasy
- Which year is a leap yeareasy
- Month number in new Dateeasy
- Finding the nearest point fasteasy
- Clamping a value into a rangeeasy
- Math.sin(90) is not 1easy
- Sum of 1 to 100easy
- Random whole number in a rangeeasy
- Percent up, then back downeasy
- Reading binary 1011easy
- Hex colour to RGB valueseasy
- Median of four valueseasy
- Checking for NaNeasy
- Dividing by zero in JavaScripteasy
- Interpolating a quarter of the wayeasy
- Moving at the same speed on any deviceeasy
- VAT inside a UAE priceeasy
- Compound interest over two yearseasy
- Converting Dubai time to India timeeasy
- parseInt with a radixeasy
- Sum of 5, 10, ..., 100easy
- Years to double at 8%easy
- Average roll of a dieeasy
- Binary search steps for 1 millioneasy
- Typical salary with one outliereasy
- Turning an ADC reading into voltseasy
- PWM duty cycle and average voltageeasy
- First byte of 0x12345678 in memoryeasy
- Batch or stream processingeasy
- XOR of a rangemedium
- Maximum XOR of two numbersmedium
- Next index in a Fenwick updatemedium
- Slope as a map keymedium
- Find the extra lettermedium
- LCM of 84 and 36medium
- Computing LCM without overflowmedium
- Cost of the sieve of Eratosthenesmedium
- Testing whether 97 is primemedium
- Trailing zeros in 100!medium
- How many divisors 360 hasmedium
- The 100 lockers puzzlemedium
- 2**31 | 0 in JavaScriptmedium
- What -1 >>> 0 givesmedium
- Loop count of n &= n - 1medium
- Finding the one unpaired idmedium
- What n & -n returnsmedium
- Why (1.005).toFixed(2) is 1.00medium
- Math.round(-2.5) in JavaScriptmedium
- C-style integer division in JSmedium
- Stacking 20% and 10% discountsmedium
- Average order value across storesmedium
- Two people with the same birthdaymedium
- Chance two dice sum to 7medium
- Spreadsheet column for number 28medium
- Ways to pick 3 of 10medium
- Arrangements of the word BANANAmedium
- Binary search trees from 3 keysmedium
- Why fib(50) never finishesmedium
- Rotating a grid 90° clockwisemedium
- Game of Life updates go wrongmedium
- Shortest turn from 350° to 10°medium
- Angle of the vector (-1, -1)medium
- Is a rider inside the zonemedium
- Do these two circles collidemedium
- Bouncing a ball off the floormedium
- Is the player in front of the guardmedium
- Enemy vanishes on reaching playermedium
- Clock hands at 3:15medium
- Adding one month to 31 Januarymedium
- Day count off by a fractionmedium
- Reading MCMXCIVmedium
- Reversing digits of a 32-bit intmedium
- Requests in flight with Little's lawmedium
- Finding p95 from 20 timingsmedium
- Timer check across a counter wrapmedium
- Reading 0xF0 as a signed bytemedium
- One step of a smoothing filtermedium
- How often an 8-bit timer overflowsmedium
- Bias from random byte % 100hard
- Shuffling with sort and Math.randomhard
- Fisher-Yates with one wrong boundhard
- Midpoint overflow in binary searchhard
- Inverse of 3 modulo 7hard
- Computing a large power mod mhard
- Adding 1 to 2^53hard
- What Kahan summation fixeshard
- A fixed epsilon on large numbershard
- Area of a five-point plothard
- Left or right turn from a cross producthard
- Do two booking slots overlaphard
- Distance between two GPS pointshard
- EMI on a one-year loanhard
- Splitting ₹100 three wayshard
- Picking one random log line from a streamhard
- Weighted random server choicehard
- Making a Monte Carlo result 10× more precisehard
- A planet spirals away in a simulationhard
- A physics loop that never catches uphard
- Camera smoothing differs by frame ratehard
- Rotate then translate a pointhard
- Moving a model also moves its normalshard
- Lighting breaks after squashing a modelhard
- Upper bound of the fifth retry delayhard
- Luhn check digithard
- How an IBAN is checkedhard
- Replacing % with a bit maskhard
- Multiplayer games drifting aparthard
- Tax on ₹9 lakh with slabshard
- Multiplying two Q8.8 numbershard
- Brightness 200 + 100 goes darkhard
- Gray code of the number 6hard
- Is the player inside the view cone?medium
- Jitter far from the originhard
- Precision of 16-bit positionshard
- Compressing rotationshard
- Elo expected scorehard
- Setting a register biteasy
- Reading a hex register valueeasy
- Clearing one register biteasy
- Toggling an LED pineasy
- Testing a status flageasy
- Toggling an LED biteasy
- Setting bit 5 of a registereasy
- Extracting a register fieldmedium
- Writing a register fieldmedium
- Inverting a uint8_thard
- A ready flag that is always falsehard
- Clearing an EXTI flag with |=hard
- Bit-band alias of an SRAM bithard
- Making a simulation ten times more precisehard
- The DORA metricshard
- Telling a user their ID was rejectedhard
- Reading a P10 resultmedium
- Simulation with independent inputshard