w3resource

Daily Coding Challenges & Projects


Weekend


Frontend Mini Project Challenge

Theme : Mini Frontend Projects

Mini Project :

Create a Fully Accessible Dark Mode Toggle + Save Preference in LocalStorage

Requirements :

  • Toggle button switches between Light & Dark mode
  • Use CSS variables (--bg, --text)
  • Use JavaScript to save user preference
  • Smooth transition (CSS transition)
  • Works even after page refresh

Bonus :

Add a “System Theme” option using prefers-color-scheme.

Small Daily Frontend Challenge

Although weekend focuses on mini-projects, here are micro-challenges too:

Challenge 1 (JS) :

  • Create a function that debounces another function without using any libraries.
  • Challenge 2 (CSS Animation) :

  • Create an animated breathing card effect using only CSS keyframes.
  • Challenge 3 (React):

  • Build a reusable <Badge text="..." color="..." /> component.
  • Challenge 4 (Vue):

  • Create a Vue component that emits an event every time a user types into an input.
  • Backend Challenge

    Focus : Scala, R, Swift, TypeScript

    Scala Challenge :

    Build a function that computes the moving average of a list using tail recursion.

    R Challenge :

    Write an R script that:

  • Loads a CSV of sales data
  • Groups by region
  • Calculates total revenue & average revenue
  • Writes result to a new CSV
  • Swift ( Server-side / Vapor ) :

    Create a Vapor route:

    GET /users/:id/orders

    Returns all orders for a user.

    (Design the model + sample JSON response.)

    TypeScript ( Node.js + TS ) :

    Create a typed Express middleware that validates request headers:

  • Must include x-api-key
  • Must be a string
  • Throw a typed error class on failure
  • Database Query Challenge

    Problems on SQL - HR Database :

    1. Write a query to list employees whose salary is above the department average salary.
    2. Write a query to find departments where no employees were hired in the last 12 months.

    HR database



    Data Structures & Algorithms Challenge

    • Easy:
      • Problem : Return the second smallest element in an unsorted array.
      • Hint :You don’t need to sort the array. Use two tracking variables.
    • Medium :
      • Problem : Implement a function to rotate a linked list to the right by k positions.
      • Hint :Think of temporarily making the list circular.
    • Hard :
      • Problem : Given an array, find the maximum sum increasing subsequence.
      • Hint : Use DP → dp[i] = arr[i] + best increasing sum ending before i.

    Bug of the Day

    Focus : Scala, R, Swift, TypeScript

      Buggy Code ( Scala ) :

      
      val numbers = List(1, 2, 3)
      println(numbers.map(x => x * 2).foreach(println))
      

    Challenge : Find & fix the issue.


      Buggy Code ( R ) :

      
      df <- data.frame(a = c(1,2,3), b = c(4,5,6))
      print(mean(df))
      

    Challenge : Find & fix the issue.

    Buggy Code ( Swift ) :

    
    let name: String? = "John"
    print(name.uppercased())
    
    

    Challenge : Find & fix the issue.

    Buggy Code ( TypeScript ) :

    
    function add(a: number, b: number): number {
      return a + b || 0;
    }
    

    Challenge : Find & fix the issue.

    📋 Daily Micro-Project

    Focus : Backend

    Task :

    Build a Task Manager API with endpoints:

    • POST /tasks (create)
    • GET /tasks (list)
    • PUT /tasks/:id (update)
    • DELETE /tasks/:id (remove)

    Use any weekend language: Scala, R (Plumber API), Swift (Vapor), TypeScript.

    Trivia: 5 Fun Facts

    1. The first computer “bug” was an actual moth stuck in a relay (1947).
    2. Python was named after “Monty Python,” not the snake.
    3. Java was almost named Oak.
    4. Linux was originally called Freax by Linus Torvalds.
    5. Git was created by Linus Torvalds in just 10 days.

    Tool & Resource of the Day

    Tool : Postman Mock Server

    Great for frontend–backend integration without building actual APIs.

    Resource Roundup ( API Testing Special ) :

    • MDN Web Docs
    • FreeCodeCamp Certifications
    • TypeScript Handbook
    • Scala Documentation
    • Swift.org Tutorials

    Interview Question of the Day

    Daily Interview Questions

      Frontend :
      1. What are the pros/cons of using CSS variables?
      2. What is the Shadow DOM and why is it useful?
      3. How does Vue’s reactivity system track changes?
      4. Explain how React batching works.
      Backend :
      1. Explain the event loop in Node.js.Explain the event loop in Node.js.
      2. What is tail recursion in Scala?
      3. How does Swift handle memory (ARC)?
      4. What is immutability and why is it important?
      Database :
      1. What is a materialized view?
      2. How does partitioning improve performance?
      3. What are surrogate keys vs natural keys?
      Others :
      1. What is a load balancer and why is it used?
      2. What is CI/CD?

    Daily Quiz Challenge

      Frontend CSS ) :

      1. Which CSS property controls animation speed?
      2. What does ref mean in Vue?
      3. What is React’s useMemo used for?

      Backend ( Java / Kotlin ) :

      1. What is a sealed class in Scala?
      2. What is TypeScript’s never type?
      3. What is an actor in concurrent systems?

      Database :

      1. Which SQL clause removes duplicates?

      Other :

      1. What command lists running processes in Linux?

      Mixed Quiz :

      1. (Frontend) What does display: contents do?
      2. (Backend) What is a deadlock?
      3. (Database) What is ACID?

    Weekly Cross-Domain Activities ( November 28 to December 04, 2025 )

    API of the Day:

    Use the Currency Exchange API to convert an amount between currencies.

    Linux / DevOps Tip :

    Run server health check :

    top  
    htop  
    df -h  
    du -sh *  
    free -m  
    uptime  
    journalctl -xe  
    systemctl status <service>
    

    Real-World Project of the Week ( November 28 to December 04, 2025 )

    Project of the Week:

    Build a URL shortener app ( frontend + backend + database ).

    Collaborative Project :

    Join an open-source project:

    “Awesome-DSA-Practice”

    (Create algorithms + solutions in multiple languages.)

    Case Study :

    Analyze how Spotify recommendation engine works.

    Users replicate the feature using:

    • Cosine similarity
    • TF-IDF
    • Collaborative filtering

    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  17-07-2025  18-07-2025  21-07-2025  22-07-2025  23-07-2025  24-07-2025  25-07-2025  28-07-2025  29-07-2025  05-08-2025  06-08-2025  07-08-2025  11-08-2025  12-08-2025  13-08-2025  14-08-2025  15-08-2025  18-08-2025  19-08-2025  20-08-2025  21-08-2025  22-08-2025  25-08-2025  26-08-2025  27-08-2025  28-08-2025  29-08-2025  15-09-2025  16-09-2025  17-09-2025  19-09-2025  11-10-2025  22-11-2025  24-11-2025  25-11-2025  26-11-2025

    

    Follow us on Facebook and Twitter for latest update.