w3resource

Daily Coding Challenges & Projects


Monday


Frontend Mini Project Challenge

JavaScript Logical Puzzle & Debugging

Project :

Tasks : Can you solve this without using .flat() or recursion?


// Task: Flatten a nested array
const input = [1, [2, [3, 4], 5], 6];

function flatten(arr) {
  // Your code here

}

console.log(flatten(input)); // Expected: [1, 2, 3, 4, 5, 6]

Bonus : Debugging Puzzle:


let count = 0;
function increment() {
  count++;
  let count = 1;
  return count;
}
console.log(increment());
  • 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.

Fix & Explain What's Wrong!

Try it live on JSFiddle or CodePen

Backend Challenge

C, C++, C#

C Task :

    Write a program to reverse a linked list.


struct Node {
    int data;
    struct Node* next;
};

// Function prototype
struct Node* reverse(struct Node* head);

Bonus : Do it in-place with O(1) space.


Database Query Challenge

Problems on SQL - HR Database :

  1. Find the names and hire dates of employees who joined in the last 90 days.
  2. Find employees who haven't received a salary increase in the last 2 years.

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem : Check if a string has all unique characters.
    • Hint : Use a hash set or fixed array.
  • Medium:
    • Problem : Given a rotated sorted array, search for a target value.
    • Hint : Use modified binary search.
  • Hard:
    • Problem : Implement an LFU (Least Frequently Used) Cache.
    • Hint : Use doubly linked list + hashmap with frequency buckets.

Bug of the Day

C Language

    Buggy Code:

    
    #include 
    int main() {
        int a = 10, b = 0;
        int result = a / b;
        printf("Result: %d", result);
        return 0;
    }
    

Challenge : Find and fix the issue.

Hint : Division by zero! Prevent crash by adding condition.

📋 Daily Micro-Project

Frontend Focus :

Task :

Build a floating “Scroll to Top” button in plain JavaScript + CSS that appears only when the user scrolls 100px down.

Bonus : Add smooth scroll effect using window.scrollTo.


Trivia: 5 Fun Facts

  1. The first computer programmer was Ada Lovelace in the 1800s.
  2. The C programming language was developed in 1972 by Dennis Ritchie.
  3. JavaScript was created in just 10 days!
  4. The first version of Linux was released by Linus Torvalds in 1991.
  5. Git was created by Linus Torvalds in 2005 to manage the Linux kernel.

Tool & Resource of the Day

Tool : PlayCode

URL : PlayCode

An instant live JavaScript playground that supports modern frameworks, including React, Vue, and TypeScript.

Interview Question of the Day

Daily Interview Questions

    Frontend ( JavaScript ) :
    1. What is the difference between == and === in JavaScript?
    2. Explain closures in JavaScript.
    3. What is the difference between let, var, and const?
    4. How does the event loop work in JavaScript?
    Backend ( C/C++/C# ) :
    1. What is a segmentation fault in C?
    2. What is the difference between stack and heap memory?
    3. How does garbage collection work in C#?
    4. What is a pointer? How is it different from a reference in C++?
    Database :
    1. What is the difference between INNER JOIN and LEFT JOIN?
    2. What is a foreign key?
    3. What is normalization? Why is it important?
    Others :
    1. What is the difference between compiler and interpreter?
    2. What is a race condition in multithreading?

Daily Quiz Challenge

    Frontend Quiz ( JavaScript ) :

    1. What is the result of typeof null?
      • "null"
      • "object"
      • "undefined"
      • "boolean"
    2. What does the this keyword refer to in a regular function?
      • The current function
      • The global object
      • Undefined
      • None of the above
    3. What’s the output of:
      • let x = [1, 2, 3];  
        x[10] = 99;  
        console.log(x.length);
        
      • 3
      • 4
      • 11
      • 99

    Backend Quiz ( C/C++/C# ) :

    1. Which of the following is not a storage class in C?
      • auto
      • register
      • static
      • float
    2. Which keyword is used for inheritance in C++?
      • inherits
      • extend
      • :
      • super
    3. What is the default access modifier in a C++ class?
      • private
      • public
      • protected
      • internal

    Others :

    1. SQL Question: Which keyword filters grouped data?
      • WHERE
      • GROUP BY
      • HAVING
      • ORDER BY
    2. OS Question: What does ps aux do in Linux?
      • Shows available memory
      • Lists all running processes
      • Reboots system
      • None of the above

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  30-05-2025



Follow us on Facebook and Twitter for latest update.