w3resource

Daily Coding Challenges & Projects


Wednesday


Frontend Mini Project Challenge

Theme : Vue.js Components

Challenge :

Build a Vue.js component that renders a to-do list.

  • Users can add tasks via an input box.
  • Each task should have a delete button.

Bonus :Add a computed property that shows the number of remaining tasks.

Playground :Use Vue SFC Playground or CodeSandbox

Backend Challenge

Category : Python, PHP

Challenge :

Python :Write a script that reads a large CSV file in chunks (without loading into memory fully) and prints the number of rows.

PHP : Create a simple REST API endpoint in PHP that returns a JSON response with {"status": "ok", "time": "<current_server_time>"}.

Database Query Challenge

Problems on SQL - HR Database :

  1. Write a query to find employees whose salary is above the department average salary.
  2. Write a query to fetch the top 3 highest-paid employees in each department.

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem :Implement a stack using an array.
    • Hint :Use push/pop operations, track top index.
  • Medium:
    • Problem : Write a function to detect a cycle in a linked list.
    • Hint :Use two pointers – slow and fast – "Floyd’s Cycle Detection."
  • Hard:
    • Problem :Solve the Longest Increasing Subsequence problem.
    • Hint :Use dynamic programming with O(n²) or optimized O(n log n) with binary search.

Bug of the Day

Language : Python, PHP

    Buggy Code ( Python ):

    
    def divide(a, b):
        try:
            return a / b
        except:
            print("Error!")
        finally:
            return 0
    
    print(divide(10, 2))
    
    

Challenge : Why does it always return 0? How can you fix it?

📋 Daily Micro-Project

Type : Database

Optimize a slow query :

Build a REST API in Java (Spring Boot) or Kotlin (Ktor) that has:

  • Suppose you have a query:
  • SELECT * FROM Employees WHERE department_id = 5 ORDER BY salary DESC;

Task :Suggest indexing and query optimization to improve performance.

Trivia: 5 Fun Facts

  1. Python was named after Monty Python, not the snake 🐍.
  2. PHP originally stood for Personal Home Page.
  3. SQL’s NULL is not the same as zero or an empty string.
  4. Vue.js was created by Evan You in 2014.
  5. Python’s first release was in 1991 by Guido van Rossum.

Tool & Resource of the Day

Tool : DBeaver

Use : Cross-platform database management tool.

Resource Roundup :

  • SQL Indexing Basics (TutorialsPoint)
  • "SQL Performance Explained" free guide
  • DBeaver official docs for query optimization

Interview Question of the Day

Daily Interview Questions

    Frontend :
    1. What are Vue.js lifecycle hooks?
    2. Explain the difference between Vue props and data.
    3. How does Vue’s reactivity system work?
    4. What are slots in Vue.js?
    Backend :
    1. How does Python’s GIL (Global Interpreter Lock) affect threading?
    2. Explain the difference between WSGI and ASGI in Python web frameworks.
    3. What are PHP sessions, and how are they different from cookies?
    4. Explain the difference between GET and POST in HTTP.
    Database :
    1. What is a foreign key constraint?
    2. Explain the difference between clustered and non-clustered indexes.
    3. What is a database transaction? What are ACID properties?
    Others :
    1. What is virtualization, and how does it differ from containerization?
    2. Explain the difference between TCP and UDP.

Daily Quiz Challenge

    Frontend :

    1. In Vue.js, which directive is used for conditional rendering?
      • v-show
      • v-if
      • v-for
      • v-model
    2. Which of the following is NOT a Vue.js lifecycle hook?
      • created
      • mounted
      • updated
      • finalize
    3. What is the default mode of Vue Router?
      • history
      • hash
      • abstract
      • server

    Backend :

    1. In Python, what is the output?
      • 
        print(0.1 + 0.2 == 0.3)
        
      • True
      • False
    2. Which of the following is NOT a valid PHP superglobal?
      • $_GET
      • $_POST
      • $_REQUEST
      • $_CALL
    3. What is the default port of Flask development server?
      • 3000
      • 8000
      • 5000
      • 8080

    Mixed :

    1. Database : Which SQL keyword is used to combine results of two queries?
      • JOIN
      • UNION
      • INTERSECT
      • GROUP
    2. Other :Who created the PHP language?
      • Larry Wall
      • Guido van Rossum
      • Rasmus Lerdorf
      • James Gosling

Weekly Cross-Domain Activities ( August 15 to August 21, 2025 )

API of the Day:

Build a currency converter using the ExchangeRate API

Real-World Project of the Week ( August 15 to August 21, 2025 )

Project of the Week:

Idea : Build a personal expense tracker

  • Frontend : React + Tailwind CSS
  • Backend : Node.js + Express + MongoDB
  • Features : Add, edit, delete expenses; filter by date and category; show monthly summaries.

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



Follow us on Facebook and Twitter for latest update.