Daily Coding Challenges & Projects
Monday
Frontend Mini Project Challenge
JavaScript Logical Puzzles & Debugging
Challenge 1 : JavaScript Puzzle – Flatten an Array (Without Recursion)
Write a function flattenArray(arr) to flatten a deeply nested array without using recursion.
Example Input: [1, [2, [3, 4], 5], 6]
Expected Output: [1, 2, 3, 4, 5, 6]
Hint: Use a stack to simulate recursion.
Challenge 2: JavaScript Debugging
const nums = [1, 2, 3];
const doubled = nums.map(num => {
return num * 2;
}, this);
console.log(doubled);
Bug : Why does this code need this?
Fix it and explain what this is doing.
Backend Challenge
Language Focus : C++
Challenges :
Reverse a Singly Linked List in-place without using extra memory, and display the list in reverse without modifying the original list structure.
Task :
- Implement a function to reverse a singly linked list in-place (iteratively).
- Implement another function that prints the list in reverse without modifying the original list or using recursion (hint: use a stack manually or simulate it with a loop).
- Handle edge cases like an empty list and a single-node list.
Bonus Challenge:
- Implement both versions: one using an in-place reversal (for actual reversal), and another that simply prints in reverse order without reversing.
- Ensure your functions are memory-efficient (no STL containers like std::vector allowed in the reverse-print version).
Database Query Challenge
Problems on SQL - HR Database :
- Write a SQL query to find the top 5 departments with the highest average salary. Return: department_id, average_salary, and order the result in descending order.
- Write a SQL query to find employees who report to the same manager and are in the same job role. Return: manager_id, job_id, COUNT(*) as total_employees, and only include groups with more than 2 employees.
Data Structures & Algorithms Challenge
- Easy:
- Problem: Find the missing number in an array containing numbers from 1 to N with one number missing.
- Hint: Use the formula N*(N+1)/2 and subtract actual sum.
- Medium:
- Problem: Implement a stack using two queues.
- Hint: Use costly push() or pop() depending on the approach.
- Hard:
- Problem: Given a string, find the length of the longest substring without repeating characters.
- Hint: Use sliding window + hashmap.
Bug of the Day
Language Focus : C/C++/C#
Language: C
Buggy Code:
#include
int main() {
int a = 10, b = 0;
int c = a / b;
printf("%d\n", c);
return 0;
}
Challenge :
- What’s the bug?
- How would you handle division by zero safely in C?
📋 Daily Micro-Project
Frontend :
Challenge :
Create a CSS-only animated loading spinner. It should rotate continuously using @keyframes.
Tools :
Trivia: 5 Fun Facts
- The first computer bug was a literal moth found in a computer in 1947.
- Java was originally called “Oak.”
- Python is named after Monty Python’s Flying Circus, not the snake.
- The first version of Windows was released in 1985.
- Git was created by Linus Torvalds in 2005 for Linux kernel development.
Tool & Resource of the Day
Tool : CodeSandbox
Online IDE for rapid prototyping in JavaScript/React.
Interview Question of the Day
Daily Interview Questions
- What is the difference between null and undefined in JavaScript?
- Explain how the event delegation pattern works in JavaScript.
- How does the Virtual DOM work in React, and why is it useful?
- What are the key differences between Vue.js computed properties and watchers?
- What’s the difference between synchronous and asynchronous programming in Node.js?
- Explain threads vs. processes.
- How does memory management work in Python?
- RESTful API vs. GraphQL – Compare and contrast.
- What is the difference between INNER JOIN and LEFT JOIN?
- How do indexes improve SQL performance?
- Compare NoSQL vs. SQL databases.
- What are system calls in OS?
- What is containerization, and how does Docker help?
Daily Quiz Challenge
- What is the output of console.log([] + []);
- [ ]
- ""
- undefined
- object
- Which event runs when the DOM is fully loaded?
- onload
- DOMContentLoaded
- ready
- load
- What is the correct way to add a class in vanilla JS?
- element.addClass("myClass")
- element.classList.add("myClass")
- element.className += "myClass"
- element.appendClass("myClass")
Frontend ( JavaScript ) :
- Which of these is not a valid C storage class?
- auto
- register
- public
- static
- How is memory deallocated in C++?
- delete
- free
- remove
- dispose
- What is the purpose of using namespace std; in C++?
- To use built-in C libraries
- To avoid writing std:: prefix
- To define a class
- None of the above
Backend ( C, C++, C# ) :
- What is the default sort order of ORDER BY?
- ASC
- DESC
- Random
- None
- What does ps aux do in Linux?
- Shows process list
- Displays current directory
- Shows memory usage
- Updates packages
Others :
Weekly Cross-Domain Activities ( May 09 to May 15, 2025 )
API of the Day:
NASA Astronomy Picture of the Day (APOD) — Use NASA's APOD API to fetch the image or video of the day along with its description, and display it in a simple UI.
Challenge :
Build a gallery-style viewer where users can:
- See today’s image
- Browse previous days using a calendar or buttons
- Read accompanying explanations
Resource:
Linux/DevOps Tip :
Monitor disk I/O and performance using iotop, sar, and glances
Commands to Explore :
- iotop – Monitor real-time I/O usage by processes
- sar – Collect, report, or save system activity information
- glances – A cross-platform monitoring tool with an elegant web UI
Real-World Project of the Week ( May 09 to May 15, 2025 )
Project of the Week:
- Add, categorize, and delete transactions
- View monthly summaries and pie charts
- Store data locally or connect to a backend for persistence
Build a Budget Tracker Web App — Develop a web-based expense tracker where users can:
Tech Stack : HTML, CSS, JavaScript (with Chart.js for graphs)
Collaborative Project:
Join the First Contributions GitHub Project — Learn how to make your first open-source pull request and contribute to beginner-friendly repositories with guided instructions.
Case Study:
Explore Trello's Task Management UI — Analyze how Trello manages drag-and-drop task organization with React and libraries like react-beautiful-dnd.
Challenge :
Try building a minimal Kanban board with drag-and-drop cards and persistent state.
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