Daily Coding Challenges & Projects
Thursday
Frontend Mini Project Challenge
React Hooks & State Management
Challenge :
Build a Counter App Using React Hooks
Requirements :
- Use useState for counter state.
- Add buttons to increment, decrement, and reset the counter.
- Use useEffect to log counter changes.
Bonus : Persist counter state to localStorage.
Backend Challenge
Node.js & Go
Challenge : Create a REST API that handles user registration and login
Node.js (Express) or Go (Gin/Gorilla)
Requirements:
- Register: Accept username and password, hash password before saving
- Login: Validate credentials and return JWT token
Bonus: Add middleware to protect a route using the JWT
Database Query Challenge
Problems on SQL - HR Database :
- Write a SQL query to find the top 3 highest-paid employees in each department.
- Write a SQL query to list employees who have never been promoted (i.e., same job title since joining).
Data Structures & Algorithms Challenge
- Easy:
- Problem : Find the maximum element in a rotated sorted array.
- Hint : Use binary search, consider mid-element conditions.
- Medium:
- Problem : Group an array of strings into anagrams.
- Hint : Use a hash map with sorted word as key.
- Hard:
- Problem : Implement a Trie (Prefix Tree) with insert, search, and startsWith methods.
- Hint : Use nested dictionaries or nodes with child pointers.
Bug of the Day
Node.js & Go
Node.js Bug
Buggy Code:
const express = require("express");
const app = express();
app.get("/greet", (req, res) => {
const name = req.query.name || "Guest";
res.send("Hello, " + name);
});
app.listen(3000);
console.log("Server started");
Challenge : The server throws an error on running. Identify and fix it to correctly greet the user by name.
📋 Daily Micro-Project
Frontend Focus :
Task :
Create a Responsive Navigation Bar using React
- Include logo, navigation links, and a hamburger menu.
- Collapse into a mobile menu on smaller screens.
Bonus : Animate the menu toggle with CSS transitions.
Trivia: 5 Fun Facts
- JavaScript was created in just 10 days by Brendan Eich.
- Node.js allows running JS server-side.
- Go was created at Google in 2009.
- React was open-sourced by Facebook in 2013.
- The concept of hooks in React was introduced in version 16.8.
Tool & Resource of the Day
Tool : Postman
A powerful tool to test RESTful APIs and monitor requests.
Interview Question of the Day
Daily Interview Questions
- What is the difference between useEffect and useLayoutEffect?
- How does state management work in React with useReducer?
- What are controlled vs uncontrolled components in React?
- What causes React components to re-render?
-
Backend ( Node.js & Go ) :
- How does the event loop work in Node.js?
- Explain middleware in Express.js.
- How does Go handle concurrency with goroutines and channels?
- What is the role of defer in Go?
- What is a clustered vs non-clustered index?
- How do you optimize a slow SQL query?
- What are the ACID properties of a database?
- What is a race condition and how can it be avoided?
- What is the purpose of a reverse proxy in a web architecture?
Daily Quiz Challenge
- Which hook allows you to persist state between renders?
- useMemo
- useEffect
- useState
- useRef
- What does the second argument of useEffect represent?
- Event handler
- Cleanup function
- Dependency array
- JSX element
- Which of the following triggers a re-render in React?
- useRef change
- useState change
- console.log
- None of the above
Frontend Quiz ( React ) :
- Which module is used to create a server in Node.js?
- express
- http
- url
- fs
- What does goroutine mean in Go?
- A data type
- A function pointer
- A lightweight thread
- A type of loop
- How do you install a Node package locally?
- npm init
- npm install
- node install
- npm get
Backend Quiz ( Node.js & Go ) :
- Which SQL clause is used with aggregate functions to filter rows?
- WHERE
- JOIN
- HAVING
- GROUP
Database :
- Which of the following is a compiled language?
- PHP
- JavaScript
- Go
- Python
Mixed Quiz :
Weekly Cross-Domain Activities ( June 13 to June 19, 2025 )
API of the Day:
OpenWeatherMap API :
Use the REST Countries API
Task : Build a React app that lets users search a country and shows its flag, capital, and region.
Linux/DevOps Tip :
Top 5 Linux commands for server monitoring:
- top
- htop
- vmstat
- iotop
- netstat -tulpn
Real-World Project of the Week ( June 13 to June 19, 2025 )
Project of the Week:
Build a Task Manager App (Frontend + Backend + DB)
- Use React for UI
- Node.js + Express for API
- PostgreSQL for data persistence
Collaborative Project:
Contribute to the open-source Habit Tracker project on GitHub: github.com/codecrafters-io/habit-tracker.
Case Study:
How Notion Manages Real-Time Collaboration:
- WebSockets, Operational Transform (OT), and React for UI syncing.
Try replicating a collaborative notes editor using Firebase Realtime DB
Previous Daily Coding Challenges & Projects : 04-04-2025 07-04-2025 08-04-2025 09-04-2025 10-04-2025 11-04-2025 14-04-2025 15-04-2025 16-04-2025 17-04-2025 18-04-2025 21-04-2025 22-04-2025 23-04-2025 24-04-2025 25-04-2025 28-04-2025 29-04-2025 30-04-2025 01-05-2025 02-05-2025 05-05-2025 06-05-2025 07-05-2025 08-05-2025 09-05-2025 12-05-2025 13-05-2025 14-05-2025 15-05-2025 16-05-2025 19-05-2025 20-05-2025 21-05-2025 22-05-2025 23-05-2025 26-05-2025 27-05-2025 29-05-2025 30-05-2025 02-06-2025 03-06-2025 04-06-2025 05-06-2025 06-06-2025 09-06-2025 10-06-2025 11-06-2025 12-06-2025 13-06-2025 16-06-2025 17-06-2025 18-06-2025