Bonus Machine Coding Questions to Practice
Beyond the common questions, here are bonus questions that may be asked in frontend interviews.
Bonus Machine Coding Questions to Practice
Beyond the common questions (OTP, autocomplete, pagination), here are bonus questions that may be asked.
1. Star Rating Component
Build a star rating with hover, click to select, and half-star support.
Key features: hover preview, click to lock, half-star precision, reset.
2. Todo List with Filters
Build a todo list with add, edit, delete, and filter (all, active, completed).
Key features: add/edit/delete, filter, localStorage persistence, count of remaining.
3. Nested Comments (Reddit-style)
Build a nested comments system with reply, upvote/downvote, and collapse.
Key features: recursive rendering, reply, vote, collapse/expand, indentation.
4. Tic-Tac-Toe Game
Build a tic-tac-toe game with two players, win detection, and reset.
Key features: grid, click to place, win/draw detection, reset, score tracking.
5. Stopwatch
Build a stopwatch with start, stop, reset, and lap times.
Key features: start/stop/reset, lap times display, elapsed time, formatting.
6. Calculator
Build a calculator with basic operations (add, subtract, multiply, divide).
Key features: display, buttons, operations, clear, decimal, keyboard support.
7. Password Strength Meter
Build a password input with a strength indicator (weak, medium, strong).
Key features: input, strength calculation (length, special chars, numbers), visual indicator.
8. Drag and Drop List
Build a list where items can be reordered by dragging.
Key features: dragstart, dragover, drop, reorder, visual feedback.
9. Tooltip Component
Build a tooltip that appears on hover, with positioning (top, bottom, left, right).
Key features: hover to show, positioning, delay, accessible (ARIA).
10. Breadth-First Search Visualizer
Build a grid visualizer for BFS pathfinding.
Key features: grid, start/end nodes, walls, BFS animation, shortest path.
How to Use These
- Practice after mastering the common questions.
- These are less common but may appear in harder interviews.
- They test additional skills: recursion (nested comments), game logic (tic-tac-toe), algorithms (BFS), and drag-and-drop API.
The Takeaway
Bonus machine coding questions: star rating, todo list with filters, nested comments, tic-tac-toe, stopwatch, calculator, password strength meter, drag and drop list, tooltip, and BFS visualizer. Practice these after mastering the common questions. They test additional skills and may appear in harder interviews.
Star rating, todo list with filters, nested comments (Reddit-style), tic-tac-toe, stopwatch, calculator, password strength meter, drag and drop list, tooltip component, and BFS visualizer. Practice these after mastering the common questions.
Recursion (nested comments), game logic (tic-tac-toe), algorithms (BFS visualizer), drag-and-drop API, localStorage persistence, and time-based operations (stopwatch). They test skills beyond the common questions.
Use a tree data structure. Write a recursive render function. Each comment has reply, vote, and collapse handlers. Indent nested comments. Handle reply (add a child), vote (update score), and collapse (toggle children visibility).
Use the HTML Drag and Drop API: dragstart (store the dragged item), dragover (prevent default to allow drop), drop (reorder the list). Update the data array and re-render. Add visual feedback (highlight the drop target).
Less commonly than the standard questions (OTP, autocomplete, pagination), but they may appear in harder interviews or at companies that test specific skills (recursion, game logic, algorithms). Practice them after mastering the common ones.
Ready to master React completely?
Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course to dive deeper with high-quality video tutorials, solve interview questions, and a premium community.
Master React
Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course.

