w3resource

Daily Coding Challenges & Projects


Monday


Frontend Mini Project Challenge

Theme : JavaScript Logical Puzzles & Debugging

Small Challenge : JavaScript Logical Puzzle

Write a function mystery(arr) that returns the second most frequent element in an array without using any sorting.

Example :

mystery([1, 2, 2, 3, 3, 3]) → 2

JavaScript Debugging Challenge :

    Buggy Code :

    
    function add(a, b) {
      return a + b;
    }
    console.log(add("5", 3));
    

Question :

Why is the output "53" instead of 8?

Fix the issue without modifying the function name or parameters

Backend Challenge

Focus : C, C++, C#

C Challenge : Pointer Logic

Write a C function to rotate an array right by k steps in-place without using an extra array.

C++ Challenge : Class & Memory

Create a C++ class Matrix that:

  • Dynamically allocates a 2D matrix
  • Implements a deep copy constructor
  • Supports add() to add two matrices

C# Challenge : LINQ + Async

Write an async C# method that:

  • Reads a text file line-by-line
  • Uses LINQ to filter lines containing more than 3 words
  • Returns them as a list

Database Query Challenge

Problems on SQL - HR Database :

  1. Find employees who joined in the last 90 days.
  2. Find employees who never received a salary increase (compare salary history table with employee table).

HR database



Data Structures & Algorithms Challenge

  • Easy : Frequency Check
    • Problem : Given an array, return true if all frequencies are unique, else false.
    • Hint :Use a frequency map → convert values into a set → compare sizes.
  • Medium : Find Peak Element
    • Problem : Find any peak element (greater than neighbors) in O(log n).
    • Hint :Binary search: compare mid with mid+1.
  • Hard : Reconstruct Itinerary
    • Problem : Given airline tickets [(from → to)], reconstruct the lexicographically smallest itinerary starting at "JFK".
    • Hint :Hierholzer’s Algorithm + min-heap adjacency list.

Bug of the Day

Focus : C, C++, C#

    Buggy Code ( C ) :

    
    int arr[5];
    for (int i = 0; i <= 5; i++) {
        arr[i] = i * 2;
    }
    
    

Challenge : Find & fix the issue.


    Buggy Code ( C++ ) :

    
    string s = "Hello";
    cout << s[5];
    

Challenge : What’s wrong? How do you fix it?

Buggy Code ( C# ) :


int x = null;
Console.WriteLine(x);

Challenge : Identify the error and correct it.

📋 Daily Micro-Project

Focus : Frontend

Task :

Build a “Pulsing Notification Badge” using CSS + JS

  • A red circular badge
  • Pulsing animation
  • Click → count resets to zero
  • No external libraries

Trivia: 5 Fun Facts

  1. JavaScript was created in 10 days by Brendan Eich.
  2. C was originally invented to rewrite the UNIX kernel.
  3. C# was first named Cool (“C-like Object-Oriented Language”).
  4. The first computer bug was literally a moth stuck inside a relay.
  5. The name “Python” comes from Monty Python, not the snake.

Tool & Resource of the Day

Tool : ESLint

A static code analysis tool for JavaScript/TypeScript that catches bugs before runtime

Resource Roundup ( JavaScript Debugging ) :

  • "JS Debugging Handbook" — Free PDF
  • Chrome DevTools Console Cheat Sheet
  • Online playground: CodeSandbox Debug Mode

Interview Question of the Day

Daily Interview Questions

    Frontend :
    1. Why is == dangerous in JavaScript?
    2. What is event bubbling?
    3. Explain how closures work with an example.
    4. What is a pure function and why is it important?
    Backend :
    1. Difference between a process and a thread?
    2. What is a deadlock?
    3. Explain how garbage collection works in C#.
    4. Explain REST statelessness
    Database :
    1. What is a composite primary key?
    2. Explain clustered vs non-clustered index.
    3. What is ACID?
    Others :
    1. What is a kernel in OS?
    2. What is virtualization?

Daily Quiz Challenge

    Frontend :

    1. What is the output?
      • console.log([] + {});
    2. Which CSS unit is relative to the viewport width?
    3. What does event.preventDefault() do?

    Backend :

    1. What is the output of:
      • printf("%d", 5/2);
    2. Which C++ keyword prevents inheritance?
    3. What is C# async used for?

    Database :

    1. Which SQL clause is applied after GROUP BY?

    Other :

    1. Which protocol does SSH use?

    Mixed Quiz :

    1. JavaScript: What does typeof NaN return?
    2. SQL: What does COUNT(*) count?
    3. C: What does malloc() return on failure?

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  28-11-2025



Follow us on Facebook and Twitter for latest update.