w3resource

Daily Coding Challenges & Projects


Thursday


Frontend Mini Project Challenge

React Hooks & State Management

Challenge :

Build a React temperature converter that:

  • Lets users enter a value in Celsius and shows Fahrenheit.
  • Uses useState and useEffect for two-way data binding.

Bonus : Prevent unnecessary re-renders and memoize the conversion logic.

Try it on : CodeSandbox or StackBlitz

Backend Challenge

Node.js & Go

Node.js Task :

Create a REST API endpoint using Express.js to:

  • Accept a JSON POST request with user details.
  • Validate required fields (name, email).
  • Respond with a success message.

Hint : Use middleware like express.json() and validate inputs.


Go Task :

Write a Go function that:

  • Reads a CSV file line by line.
  • Stores each row into a slice of structs.
  • Prints total entries.

Database Query Challenge

Problems on SQL - HR Database :

  1. Find employees whose salary is above the department average
  2. List departments that have no managers assigned

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem :Return the second smallest element from an unsorted array.
    • Hint :Use a single pass or sort and return index 1.
  • Medium:
    • Problem : Detect a cycle in a directed graph.
    • Hint : Use DFS + recursion stack or Kahn’s algorithm.
  • Hard:
    • Problem :Implement Aho-Corasick Algorithm for pattern matching in a string.
    • Hint :Build a trie + failure links.

Bug of the Day

Language : Node.js / Go

Node.js Bug

    Buggy Code:

    
    app.post('/data', (req, res) => {
      const name = req.body.name;
      if (!name)
        res.send("Name required");
      res.send(`Hello ${name}`);
    });
    

Issue : What happens when name is missing? Fix it to avoid multiple res.send() calls.


Go Bug

    Buggy Code:

    
    func divide(a, b int) int {
        return a / b
    }
    fmt.Println(divide(10, 0))
    

Problem : Identify the crash reason and handle it using error-checking.

📋 Daily Micro-Project

Frontend Focus :

Task :

Create a tab component using React that:

  • Shows 3 tabs (Home, About, Contact).
  • Displays content dynamically when each tab is clicked.
  • Uses useState and conditional rendering.

Trivia: 5 Fun Facts

  1. React was created by Jordan Walke, a software engineer at Facebook.
  2. The Go language mascot is known as the "Gopher."
  3. JavaScript was developed in 10 days by Brendan Eich.
  4. Node.js is built on Chrome’s V8 engine.
  5. Go supports concurrency via lightweight threads called goroutines.

Tool & Resource of the Day

Tool : Insomnia

A sleek and powerful tool for testing and debugging REST & GraphQL APIs.

Resource Roundup :

  • React Hooks Cheatsheet (freeCodeCamp)

Interview Question of the Day

Daily Interview Questions

    Frontend ( React Focus ) :
    1. What are React Hooks and why are they used?
    2. Explain useEffect and give a use-case.
    3. What is the difference between controlled and uncontrolled components?
    4. What is the purpose of useMemo?
    Backend ( Node.js & Go ) :
    1. What is the difference between require and import in Node.js?
    2. Explain the event loop in Node.js.
    3. How is error handling done in Go?
    4. What are goroutines and channels in Go?
    Database :
    1. What is the difference between a view and a table?
    2. What is a foreign key constraint?
    3. What is ACID in DBMS?
    Others :
    1. What are deadlocks in operating systems?
    2. Explain how Git handles merging conflicts.

Daily Quiz Challenge

    Frontend Quiz ( React + JS ) :

    1. What does useEffect(() => {}, []) mean?
    2. What’s the result of [...new Set([1,1,2,3])]?
    3. In React, what causes re-renders?

    Backend Quiz ( Node.js & Go ) :

    1. What’s the output of setTimeout(() => console.log("Hi"), 0)?
    2. How do you handle errors in Go?
    3. Which Go keyword starts a goroutine?

    Database :

    • Which SQL clause is used to remove duplicates from a result set?

    Others :

    • What is the time complexity of binary search?

    Mixed Quiz :

    1. React: What hook replaces componentDidMount?
    2. SQL: What does GROUP BY do?
    3. Go: What’s the use of defer?

Weekly Cross-Domain Activities ( July 11 to July 17, 2025 )

API of the Day:

Task : Build a stock price tracker using Twelve Data API.

https://twelvedata.com.

Linux/DevOps Tip :

Use htop instead of top for a better interactive process viewer.

Real-World Project of the Week ( July 11 to July 17, 2025 )

Project of the Week:

Build an Expense Tracker using React + Express + MongoDB.

Collaborative Project:

Join the GitHub project “open-budget-app” and contribute a budget visualization module

Case Study:

Analyze how GitHub Actions works and create a basic CI pipeline using YAML.


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  19-06-2025  20-06-2025  23-06-2025  24-06-2025  25-06-2025  26-06-2025  27-06-2025  30-06-2025  01-07-2025  02-07-2025  03-07-2025  04-07-2025  07-07-2025  08-07-2025  09-07-2025  10-07-2025  11-07-2025  14-07-2025  15-07-2025  16-07-2025



Follow us on Facebook and Twitter for latest update.