w3resource

Daily Coding Challenges & Projects


Weekend


Frontend Mini Project Challenge

HTML, CSS & JavaScript

Project :

Tasks : Create a Customizable Countdown Timer (HTML, CSS & JavaScript)

  • Allow users to input a future date and time.
  • Display a live countdown showing days, hours, minutes, and seconds.
  • Add custom labels and color themes.
  • Provide options to pause/resume or reset the timer.

Bonus : Save user preferences (last timer settings and theme) using localStorage.

Backend Challenge

Scala , R , Swift , & TypeScript

Scala Task :

    Create a REST API in Scala using Akka HTTP to serve product data (id, name, price). Implement one GET endpoint /products/{id}.

R Task :

    Write an R script that reads a large CSV file in chunks (without loading fully into memory), and calculates the average salary of employees in each department.

Swift (Vapor) :

    Build a simple GET API /greet/{name} that returns a JSON greeting message. E.g., {"message": "Hello, Alice!"}.

TypeScript (Node.js + Express) :

    Create a POST endpoint /register that validates user input (name, email, password) using TypeScript interfaces and returns success or error messages.


Database Query Challenge

Problems on SQL - HR Database :

  1. Find all employees whose salary is above the average salary of their department.
  2. List the departments that have more than 5 employees and an average salary greater than $5000.

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem : Check if a string is a rotation of another (e.g., "abcd" and "cdab").
    • Hint : Use string concatenation.
  • Medium:
    • Problem : Implement LRU Cache from scratch (Least Recently Used) with get() and put() operations in O(1).
    • Hint : Combine HashMap and Doubly Linked List.
  • Hard:
    • Problem : Given a matrix of 0s and 1s, return the distance of each cell from the nearest 0.
    • Hint : Use BFS for multi-source shortest path.

Bug of the Day

Scala Bug :

    Buggy Code:

    
    object HelloWorld {
      def main(args: Array[String]): Unit = {
        val numbers = List(1, 2, 3)
        numbers(3) = 4
        println(numbers)
      }
    }
    

Challenge : Find the bug and fix it.


TypeScript Bug :

    Buggy Code:

    
    function greet(name: string | null) {
      console.log("Hello, " + name.toUpperCase());
    }
    greet(null);
    
    

Challenge : Find and fix the bug (hint: handle null).

📋 Daily Micro-Project

Backend Focus :

Project :

Create a backend login system with validation using Express.js (TypeScript).

  • Endpoint: POST /login
  • Validate email & password.
  • Respond with success or failure JSON.
  • Bonus: Implement dummy JWT token generation.

Trivia: 5 Fun Facts

  1. The first computer virus was called Creeper and appeared in 1971
  2. Ada Lovelace is considered the world’s first computer programmer.
  3. Google’s first storage was built using LEGO bricks.
  4. The term "bug" was first coined when a real moth was found in a computer relay.
  5. JavaScript was created in just 10 days by Brendan Eich.

Tool & Resource of the Day

Tool : Postwoman/ Hoppscotch

URL : Postwoman/ Hoppscotch

An open-source API testing tool, a lightweight alternative to Postman with collaborative features and an intuitive UI.

Resource Roundup :

Interview Question of the Day

Daily Interview Questions

    Frontend :
    1. What is event bubbling in JavaScript, and how can it be stopped?
    2. How does React manage state internally?
    3. What are the differences between v-if, v-show, and v-for in Vue.js?
    4. Explain the concept of "hydration" in server-side rendering.
    Backend :
    1. What are the main differences between Swift and Objective-C for server-side apps?
    2. How does garbage collection work in R?
    3. What are coroutines in Scala, and how do they differ from threads?
    4. What is the benefit of TypeScript over JavaScript in backend projects?
    Database :
    1. What is a materialized view?
    2. How can a foreign key constraint improve data integrity?
    3. Explain normalization and denormalization with examples.
    Others :
    1. What are the different process states in an operating system?
    2. Explain Infrastructure as Code (IaC) and how Terraform helps with it.

Daily Quiz Challenge

    Frontend Quiz :

    1. What does the this keyword refer to in JavaScript by default?
    2. Which CSS property creates a stacking context?
    3. What will this return: typeof NaN?

    Backend Quiz :

    1. What is the output of print("Hello" + 5) in Python?
    2. In Rust, what does the unwrap() function do?
    3. In TypeScript, what’s the difference between interface and type?

    Database :

    1. What does the HAVING clause do in SQL?

    Others :

    1. Which Linux command shows current memory usage?

    Mixed Quiz :

    1. What’s the output of console.log(0.1 + 0.2 === 0.3)?
    2. Which keyword is used in Rust for error handling similar to try-catch?
    3. How do you get unique rows in a SQL table?

Weekly Cross-Domain Activities ( May 30 to June 05, 2025 )

API of the Day:

Project: Build a Currency Converter App

API : ExchangeRate API

  • Use JavaScript or TypeScript
  • Input: Amount, base currency, target currency
  • Output: Converted value + real-time exchange rate

Linux/DevOps Tip :

Topic : Monitoring

Commands :

  • htop : interactive process viewer
  • iostat : CPU & disk I/O stats
  • vmstat : system performance
  • netstat -tulpn : network ports and listeners
  • du -sh * : check directory sizes

Real-World Project of the Week ( May 30 to June 05, 2025 )

Project of the Week:

    Build a Job Board Web App

  • Frontend: React + Tailwind
  • Backend: Node.js (TS) + Express + MongoDB
  • Features: Job listings, filters, candidate profiles, admin dashboard

Collaborative Project:

Open a GitHub repo for a community API library. Let developers contribute API wrappers for public APIs (e.g., weather, currency, news, etc.).

Case Study:

How does Twitter handle real-time updates? Explore websockets, long polling, and pub-sub architecture. Try implementing tweet-style live updates in your app.


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



Follow us on Facebook and Twitter for latest update.