w3resource

Daily Coding Challenges & Projects


Tuesday


Frontend Mini Project Challenge

CSS Animation Effects: Create a bouncing ball animation using only CSS.

Hint: Use @keyframes and animation properties to make the ball bounce.

Backend Challenge

Java/Kotlin: Write a Java/Kotlin function to find the longest palindrome in a given string.

Database Query Challenge

Problems:

  1. Write a query to find employees who have been with the company for more than 5 years.
  2. Retrieve the department with the highest average salary.
Sample table: employees
+-------------+-------------+-------------+----------+--------------------+------------+------------+----------+----------------+------------+---------------+
| EMPLOYEE_ID | FIRST_NAME  | LAST_NAME   | EMAIL    | PHONE_NUMBER       | HIRE_DATE  | JOB_ID     | SALARY   | COMMISSION_PCT | MANAGER_ID | DEPARTMENT_ID |
+-------------+-------------+-------------+----------+--------------------+------------+------------+----------+----------------+------------+---------------+
|         100 | Steven      | King        | SKING    | 515.123.4567       | 2003-06-17 | AD_PRES    | 24000.00 |           0.00 |          0 |            90 |
|         101 | Neena       | Kochhar     | NKOCHHAR | 515.123.4568       | 2005-09-21 | AD_VP      | 17000.00 |           0.00 |        100 |            90 |
|         102 | Lex         | De Haan     | LDEHAAN  | 515.123.4569       | 2001-01-13 | AD_VP      | 17000.00 |           0.00 |        100 |            90 |
|         103 | Alexander   | Hunold      | AHUNOLD  | 590.423.4567       | 2006-01-03 | IT_PROG    |  9000.00 |           0.00 |        102 |            60 |
|         104 | Bruce       | Ernst       | BERNST   | 590.423.4568       | 2007-05-21 | IT_PROG    |  6000.00 |           0.00 |        103 |            60 |
|         105 | David       | Austin      | DAUSTIN  | 590.423.4569       | 2005-06-25 | IT_PROG    |  4800.00 |           0.00 |        103 |            60 |
|         106 | Valli       | Pataballa   | VPATABAL | 590.423.4560       | 2006-02-05 | IT_PROG    |  4800.00 |           0.00 |        103 |            60 |
|         107 | Diana       | Lorentz     | DLORENTZ | 590.423.5567       | 2007-02-07 | IT_PROG    |  4200.00 |           0.00 |        103 |            60 |
|         108 | Nancy       | Greenberg   | NGREENBE | 515.124.4569       | 2002-08-17 | FI_MGR     | 12008.00 |           0.00 |        101 |           100 |
|         109 | Daniel      | Faviet      | DFAVIET  | 515.124.4169       | 2002-08-16 | FI_ACCOUNT |  9000.00 |           0.00 |        108 |           100 |
.......

View the table



Data Structures & Algorithms Challenge

  • Easy: Reverse a string without using built-in functions. (Hint: Use a loop and swap characters.)
  • Medium: Find the first non-repeating character in a string. (Hint: Use a hash table.)
  • Hard: Implement a min-heap from scratch. (Hint: Use an array and implement heapify operations.)

Bug of the Day

Bug of the Day (Java/Kotlin)

Bug:


public class Main {
    public static void main(String[] args) {
        String s = null;
        if (s.length() > 0) {
            System.out.println("String is not empty");
        }
    }
}

Find and fix the issue!

📋 Daily Micro-Project

Backend Task:

    Build a simple REST API in Java Spring Boot that returns a list of users.

Trivia: 5 Fun Facts

  1. Who developed the C programming language?
  2. What year was Python first released?
  3. What does CRUD stand for in databases?
  4. Which company developed TypeScript?
  5. What is the default port for MySQL?

Tool of the Day

PostgreSQL – A powerful, open-source relational database. Learn how to set up and use it effectively.

Interview Question of the Day

Daily Interview Questions

    Frontend (4 Questions)
    1. What is event bubbling and event capturing in JavaScript?
    2. Explain the difference between React props and state.
    3. How do you optimize a Vue.js application for performance?
    4. What are CSS pseudo-elements? Provide examples.
    Backend (4 Questions)
    1. What is the difference between HTTP and WebSockets?
    2. Explain the concept of Dependency Injection in Spring Boot.
    3. How does garbage collection work in Java?
    4. What is a coroutine in Kotlin?
    Database (3 Questions)
    1. What are stored procedures, and how are they used?
    2. Explain the concept of ACID properties in databases.
    3. How does database normalization improve performance?
    Others (2 Questions)
    1. What are the differences between virtualization and containerization?
    2. How does an operating system manage memory allocation?

Daily Quiz Challenge

Frontend Quiz (3 Questions)

  1. What is the purpose of the defer attribute in a script tag?
  2. How do you create a CSS grid layout?
  3. What is the difference between relative and absolute positioning in CSS?

Backend Quiz (3 Questions)

  1. What is an ORM, and why is it used in backend development?
  2. How do you implement authentication in a REST API?
  3. What is the difference between synchronous and asynchronous execution?

Others Quiz (2 Questions)

  1. What is an index in SQL, and how does it work?
  2. What are the main differences between Linux and Windows operating systems?

Weekly Cross-Domain Activities ( April 4 to 10, 2025 )

Task: Hints for Building a Simple Weather App using OpenWeatherMap API

  1. Get an API Key
    • Sign up at OpenWeatherMap and get a free API key.
  1. Choose an HTTP Request Method
    • Use fetch() in JavaScript or requests in Python to get weather data.
  1. API Endpoint Example
  1. Use this URL:
    • https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY&units=metric
    • Replace London with the city name and YOUR_API_KEY with your actual API key
  1. Extract Important Data
    • Parse the JSON response to extract key details like temperature, humidity, and weather description.
  1. Display the Data
    • Show weather details in a simple UI using HTML, CSS, and JavaScript.
    • Example: Display city name, temperature, and weather conditions.
  1. Handle Errors Gracefully
    • Show an error message if the city is not found or the API call fails.
  1. Enhancements (Optional)
    • Allow users to enter any city name.
    • Show weather icons based on conditions.
    • Use geolocation to fetch the user’s current weather.

orgopenweathermap.org

Current weather and forecast - OpenWeatherMap

OpenWeather provides comprehensive weather data services, including current, forecast, and historical weather information. Explore a wide range of APIs for solar radiation, road risk assessment, solar energy prediction, and more, with global coverage and user-friendly access. Ideal for developers and businesses seeking accurate and reliable weather insights.

Real-World Project of the Week ( April 4 to 10, 2025 )

Project: Build a Personal Portfolio Website

Tech Stack: HTML, CSS, JavaScript (Optional: React, TailwindCSS)


Previous Daily Coding Challenges & Projects : 04-04-2025   07-04-2025



Follow us on Facebook and Twitter for latest update.