w3resource

Daily Coding Challenges & Projects


Thursday


Frontend Mini Project Challenge

React Hooks & State Management

Challenge :

Create a React component that uses useState and useEffect to fetch a list of GitHub repositories for a given user and display them.

Bonus : Show a loading state while fetching.

Try it here : CodeSandbox

Backend Challenge

Node.js & Go

Node.js Problem :

Build a simple Express.js API that accepts a POST request with a JSON body and returns the reversed string sent in the body.

Go Problem :

Write a Go program to monitor a given URL every 30 seconds and log its HTTP status code.

Database Query Challenge

Problems on SQL - HR Database :

  1. Write a SQL query to find the department that has the highest average salary.
  2. Write a query to list employees who were hired in the same year as their manager.
Structure of HR database :

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem: Write a function to find the maximum element in a rotated sorted array.
    • Hint: Use modified binary search.
  • Medium:
    • Problem: Implement a stack that supports getMin() in constant time.
    • Hint: Use an auxiliary stack to track minimums.
  • Hard:
    • Problem: Given a directed graph, detect whether there is a cycle using DFS.
    • Hint: Use visited and recursion stack arrays.

Bug of the Day

Node.js ( JavaScript )

    Buggy Code:

    
    const numbers = [1, 2, 3];
    numbers.forEach(async (num) => {
      const doubled = await double(num);
      console.log(doubled);
    });
    
    function double(n) {
      return Promise.resolve(n * 2);
    }
    

Challenge :

Why might this not work as expected? Fix it.

📋 Daily Micro-Project

Frontend

Project :

Create a React-based toggle button that switches between light and dark themes using useContext.


Trivia: 5 Fun Facts

  1. React was first released in 2013 by Facebook.
  2. Go (Golang) was created at Google by Robert Griesemer, Rob Pike, and Ken Thompson.
  3. The original name of Java was Oak.
  4. Node.js runs JavaScript outside the browser using the V8 engine.
  5. In CSS, z-index only works on positioned elements.

Tool & Resource of the Day

Tool : LangChain

Use Case :

Build context-aware LLM applications using prompts, memory, chaining, and agents.

https://www.langchain.com

Resource Roundup:

Interview Question of the Day

Daily Interview Questions

    Frontend ( React & JS ) :
    1. What is the purpose of the useEffect hook in React?
    2. Explain the difference between controlled and uncontrolled components in React.
    3. What is a React fragment and when would you use it?
    4. How does React's reconciliation algorithm work?
    Backend ( Node.js & Go ) :
    1. What is the event loop in Node.js?
    2. How do goroutines differ from threads in Go?
    3. What is the difference between require and import in Node.js?
    4. How does error handling differ between Go and JavaScript?
    Database :
    1. What is a foreign key constraint?
    2. How do you normalize a database and why is it important?
    3. What is the difference between DELETE and TRUNCATE?
    Others :
    1. What is garbage collection in programming?
    2. Explain the role of middleware in web frameworks.

Daily Quiz Challenge

    Frontend ( React ) :

    1. What hook would you use to handle form inputs in React?
    2. Which React feature allows you to share logic across components?
    3. What’s the output of:
    4. 
      const [count, setCount] = useState(0);
      useEffect(() => setCount(5), []);
      

    Backend ( Node.js & Go ) :

    1. What is the purpose of package.json in Node.js?
    2. In Go, what is the default value of an uninitialized int?
    3. What does res.end() do in Node.js HTTP server?

    Database :

    1. Which SQL clause is used to rename a column in the result set?

    Others :

    1. What does the acronym CRUD stand for?

    Mixed Quiz :

    1. Frontend: What does useRef do in React?
    2. Backend: How do you return a JSON response in Express.js?
    3. Database: What’s the default order of results returned by SQL SELECT?

Weekly Cross-Domain Activities ( May 09 to May 15, 2025 )

API of the Day:

NASA Astronomy Picture of the Day (APOD) — Use NASA's APOD API to fetch the image or video of the day along with its description, and display it in a simple UI.

Challenge :

Build a gallery-style viewer where users can:

  • See today’s image
  • Browse previous days using a calendar or buttons
  • Read accompanying explanations

Resource:

Linux/DevOps Tip :

Monitor disk I/O and performance using iotop, sar, and glances

Commands to Explore :

  • iotop – Monitor real-time I/O usage by processes
  • sar – Collect, report, or save system activity information
  • glances – A cross-platform monitoring tool with an elegant web UI

Real-World Project of the Week ( May 09 to May 15, 2025 )

Project of the Week:

    Build a Budget Tracker Web App — Develop a web-based expense tracker where users can:

    • Add, categorize, and delete transactions
    • View monthly summaries and pie charts
    • Store data locally or connect to a backend for persistence

Tech Stack : HTML, CSS, JavaScript (with Chart.js for graphs)

Collaborative Project:

    Join the First Contributions GitHub Project — Learn how to make your first open-source pull request and contribute to beginner-friendly repositories with guided instructions.

Case Study:

    Explore Trello's Task Management UI — Analyze how Trello manages drag-and-drop task organization with React and libraries like react-beautiful-dnd.

Challenge :

Try building a minimal Kanban board with drag-and-drop cards and persistent state.


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



Follow us on Facebook and Twitter for latest update.