w3resource

Daily Coding Challenges & Projects


Weekend


Frontend Mini Project Challenge

Focus : HTML + CSS + JavaScript

Mini Frontend Project :

Create a Dark Mode Toggle with Smooth Transition

Requirements :

  • Use HTML + CSS + JavaScript
  • Store theme preference in localStorage
  • Background + text colors must smoothly animate
  • Add a sun/moon icon toggle

Bonus :

  • Let users choose custom colors
  • Add a “system-theme” auto-detect mode

Playground : CodeSandbox / JSFiddle / CodePen setups recommended.

Backend Challenge

Language Focus : Scala, R, Swift, TypeScript

Scala Challenge :

Task : Build a function that reads a large CSV file asynchronously and returns only rows where a selected column exceeds a given threshold.

  • Avoid loading the entire file into memory.
  • Use Akka Streams or fs2 Streams.

R Challenge ( Data-focused Backend ) :

Task : Build an API-like R script that:

  • Reads an employee dataset
  • Computes department-wise salary averages
  • Returns JSON output
  • Use: dplyr, jsonlite, plumber (optional for API mode)

Swift Challenge ( Server-side Vapor ) :

Task :Create a /users/search endpoint in Vapor that:

  • Accepts a query string name
  • Returns all users whose name starts with the query
  • Use SQLite DB

TypeScript ( Node.js + TS ) Challenge :

Task :Write middleware in Express + TypeScript that:

  • Logs response time for each request
  • Enforces a rate limit per IP
  • Returns 429 when exceeded

Database Query Challenge

Problems on SQL - HR Database :

  1. Find employees who joined within the last 6 months and belong to departments where the average salary is above 10,000.
  2. Write a query to list employees who never reported to any manager (i.e., manager_id IS NULL) and earn above the department average salary.

HR database



Data Structures & Algorithms Challenge

  • Easy :
    • Problem : Given a list of integers, return true if any two numbers sum up to a target value, else false.
    • Hint : hint
      • Use a hash set
      • Look for target - current_value on each iteration
  • Medium :
    • Problem : Implement an algorithm to rotate a matrix 90° clockwise, in-place.
    • Hint : hint
      • First transpose
      • Then reverse each row
  • Hard :
    • Problem : Given a weighted directed graph, find the number of distinct shortest paths from source S to destination D.
    • Hint : hint
      • Modify Dijkstra to keep a count[] array
      • When a shorter path is found → update
      • When an equal path is found → increment count

Bug of the Day

Language Focus : Scala, R, Swift, TypeScript

    Buggy Code ( Scala ) :

    
    val nums = List(1, 2, 3)
    println(nums.map(_ + "1").map(_.toInt))
    

Challenge : What’s wrong? Fix it.


    Buggy Code ( R ) :

    
    df <- data.frame(a = c(1,2,3), b = c(4,5,6))
    df$c = df["a"] + df["b"]
    print(df)
    

Challenge : Why is the new column incorrect? Fix it.

    Buggy Code ( Swift ) :

    
    var arr = [1,2,3]
    for num in arr {
        arr.append(num * 2)
    }
    print(arr)
    

Challenge : Identify the issue and correct it.


    Buggy Code ( TypeScript ) :

    
    function add(a: number, b: number): number {
        return a + b.toString();
    }
    

Challenge : Fix the incorrect return value.

📋 Daily Micro-Project

Focus : Backend

Project : Build a Simple Backend Cache Layer

  • Language: Any (Scala / R / Swift / TS)
  • TTL expiration :
    • In-memory key-value store
    • useReducer
    • GET, SET, DELETE endpoints
    • Auto-cleaner for expired keys

Bonus :Persist to local file.

Trivia: 5 Fun Facts

  1. The first computer bug was a literal moth stuck in the Harvard Mark II.
  2. The Scala language name means Scalable Language.
  3. Swift was built secretly inside Apple for four years before release.
  4. R was named after the first names of its creators, Ross and Robert.
  5. TypeScript was created by Microsoft to fix JavaScript’s scaling issues.

Tool & Resource of the Day

Tool : Postman Collections Runner

Perfect for :

  • Automated API tests
  • Bulk execution
  • Environment-based workflows

Resource Roundup :

  • Free Scala eBook – "Scala School"
  • R for Data Science (Free online book)
  • Swift Server-Side Handbook (Free)
  • TypeScript Cheat Sheet (Official TS docs)

Interview Question of the Day

Daily Interview Questions

    Frontend :
    1. What is the purpose of key in Vue and React loops?
    2. How do CSS transitions differ from CSS animations?
    3. What is Vue’s reactivity system and how does it detect changes?
    4. Explain controlled vs uncontrolled components in React.
    Backend ( Scala, R, Swift, TS ) :
    1. How does immutability improve concurrency in Scala?
    2. How is memory handled differently in R vs typical backend languages?
    3. How does Swift optimize performance on server-side frameworks?
    4. Explain TypeScript’s structural typing system.
    Database :
    1. What is a correlated subquery?
    2. When should you use a composite index?
    3. Explain database partitioning vs sharding.
    Others :
    1. What is a system daemon in Linux?
    2. What problem does Kubernetes solve?

Daily Quiz Challenge

    Frontend ( React & JS ) :

    1. What does v-if do in Vue?
    2. Which CSS property enables smooth animation transitions?
    3. What is useEffect primarily used for?

    Backend ( Node.js & Go ):

    1. Scala runs on which virtual machine?
    2. Which R package is used for building APIs?
    3. TypeScript compiles down to which language?

    Database :

    1. Which SQL function returns the highest value in a column?

    Other Tech :

    1. Docker containers are isolated using which kernel feature?
      • Threads
      • Namespaces
      • RAM partitions
      • File descriptors

    Mixed Quiz :

    1. Identify the incorrect statement:
      • React re-renders when state changes
      • NoSQL databases always enforce schemas
      • TypeScript adds static typing to JavaScript

Weekly Cross-Domain Activities ( December 13 to December 18, 2025 )

API of the Day:

Build a crypto price viewer using the CoinGecko API.

  • Must auto-refresh prices
  • Sort by top gainers

Linux / DevOps Tip :

5 commands to monitor server health :

  • free -h
  • vmstat
  • top
  • htop
  • sar -r

Real-World Project of the Week ( December 13 to December 18, 2025 )

Project of the Week:

Build a Job Search Aggregator using public APIs + frontend filters

Collaborative Project :

Contribute to an open-source Vue UI library (e.g., Element Plus).

Case Study :

Break down how Notion uses virtual rendering to handle huge documents smoothly.


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  28-11-2025  01-12-2025  02-12-2025  03-12-2025  04-12-2025  05-12-2025  10-12-2025  11-12-2025



Follow us on Facebook and Twitter for latest update.