w3resource

Daily Coding Challenges & Projects


Thursday


Frontend Mini Project Challenge

React Hooks & State Management

Challenge :

Build a To-Do List with Persistent State

  • Use useState and useEffect to manage and persist tasks in localStorage.
  • Allow users to add, delete, and toggle completion status of tasks.
  • Bonus: Add a filter for “All”, “Completed”, and “Pending” tasks.

Try it live : CodeSandbox

Backend Challenge

Languages: Node.js (JavaScript), Go

Node.js Challenge:

Problem : Create an Express.js API with a GET /books endpoint.

  • Load book data from a JSON file.
  • Support query parameters for author and genre filtering.

Go Challenge:

Problem : Write a Go program to implement a basic key-value in-memory store.

  • Support commands: SET key value, GET key, DELETE key.

Database Query Challenge

Problems on SQL - HR Database :

  1. Retrieve the department name and average salary of departments where the average salary is more than 10,000.
  2. Find employees who report to a manager that is also an employee in the same department. (Hint: Use self-join)

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem : Check if a string is a palindrome using two pointers.
    • Hint : Use start and end index comparison.
  • Medium:
    • Problem : Implement a Least Recently Used (LRU) Cache.
    • Hint : Use Map and doubly-linked list or JavaScript Map ordering feature.
  • Hard:
    • Problem : Word Ladder - Given a start word, end word, and a dictionary, transform start to end with minimal word transformations (1 letter change at a time).
    • Hint : Use BFS.

Bug of the Day

Language Focus : Node.js / JavaScript

Python Bug:

    Buggy Code:

    
    const user = {
      name: "Alice",
      greet: () => {
        console.log(`Hello, my name is ${this.name}`);
      }
    };
    
    user.greet();
    

Find & Fix :: Why is undefined printed? Fix the bug so it prints: Hello, my name is Alice.

📋 Daily Micro-Project

Frontend Focus : React

Task :

Create a Light/Dark Theme Switcher

  • Use useState to toggle themes
  • Store preference in localStorage
  • Style using CSS variables or Tailwind classes

Trivia: 5 Fun Facts

  1. React was first released by Facebook in 2013.
  2. Go (Golang) was created at Google in 2007.
  3. The first computer bug was an actual moth in 1947.
  4. JavaScript was created in 10 days by Brendan Eich.
  5. console.log() is the most-used JS statement ever.

Tool & Resource of the Day

Tool : React Developer Tools (Chrome Extension)

  • Inspect component trees, state, and props easily.

Resource Roundup:

Interview Question of the Day

Daily Interview Questions

    Frontend ( React Focused ) :
    1. What are the rules of hooks in React?
    2. What is the difference between useEffect and useLayoutEffect?
    3. How does useReducer work compared to useState?
    4. What is reconciliation in React and how does it relate to virtual DOM?
    Backend :
    1. What are middleware functions in Express.js?
    2. How does Node.js handle concurrency with a single thread?
    3. What is a goroutine in Go and how is it different from a thread?
    4. Explain the role of context (context.Context) in Go APIs.
    Database :
    1. What is a correlated subquery in SQL?
    2. How does the WITH clause (Common Table Expression) work in SQL?
    3. What is normalization and why is it important?
    Others :
    1. What is a race condition in multithreading?
    2. Explain the CAP theorem in distributed systems.

Daily Quiz Challenge

    Frontend Quiz ( React/JS ) :

    1. What does useEffect(() => {}, []) mean?
    2. Which hook is used to share logic between components?
    3. What is the correct way to update state based on previous state?

    Backend Quiz ( Node.js, Go ) :

    1. What is the default port used by Express.js?
    2. What does the defer keyword do in Go?
    3. What is the event loop in Node.js?

    Database :

    1. Which SQL clause is used to limit rows returned?

    Others :

    1. What does CI/CD stand for?

    Mixed Quiz :

    1. Which one runs faster: Array iteration in Go or JS?
    2. What does React’s key prop help with?

Weekly Cross-Domain Activities ( Thursday Preview )

API of the Day:

OpenLibrary API – Build a book search UI using their public book search API.


Linux/DevOps Tip :

Monitor CPU usage using:

top
htop
mpstat -P ALL 1

Real-World Project of the Week

Project of the Week:

    Build a Budget Tracker using React + localStorage

  • CRUD expenses
  • Track categories & monthly stats

Collaborative Project:

Start a GitHub project: "Open-Source DSA Visualizer" using React + D3.js

Case Study:

Notion Clone UI – Study how Notion handles blocks and dynamic layouts using React.


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



Follow us on Facebook and Twitter for latest update.