Day 1 of #30DaysOfCode: Kicking Off with Java, React, and LeetCode


Today marks the first day of my #30DaysOfCode challenge! I’m excited to dive deep into Data Structures and Algorithms (DSA) with Java, explore more of React, and tackle some challenging LeetCode problems. Here’s a recap of what I accomplished on Day 1.

DSA - Arrays Revision in Java

I started the day with a revision of arrays in Java, focusing on basic operations, traversal, and searching techniques. Arrays are fundamental to most programming challenges, and revisiting these basics was a great way to reinforce my understanding.

Topics Covered:

  • Array Basics: Initializing, updating, and accessing elements.

  • Traversal Techniques: Iterating through arrays to manipulate data.

  • Searching Algorithms: Implementing linear search and binary search to find elements efficiently.

This revision was crucial in setting a strong foundation for tackling more complex DSA problems in the coming days.

React Learning - Building a Background Color Changer

For my React learning, I built a simple yet fun project: a background color changer app. The project was an excellent way to practice React fundamentals, especially the useState hook and event handling.

Project: bg-changer

Concepts Used:

  • useState hook for managing state within the component.

  • Event handling to trigger background color changes on button clicks.

This project helped solidify my understanding of state management in React and gave me more confidence in building interactive components.

LeetCode Problems Solved

I rounded out Day 1 by solving four LeetCode problems, each of which focused on arrays and searching algorithms.

Problems Solved:

  1. Contains Duplicate: I tried different approaches, including using a set and sorting the array to detect duplicates efficiently.

  2. Find the Duplicate Number: Explored various methods such as modifying the array in place and using a binary search approach.

  3. Find All Numbers Disappeared in an Array: Tried manipulating the array directly and using additional space to track the missing numbers.

  4. Missing Number: Tested multiple strategies, including using the sum formula and XOR operations to find the missing number in a sequence.

Each problem required a different strategy, and I enjoyed experimenting with various algorithms to find the most efficient solutions.

Final Thoughts

Day 1 of #30DaysOfCode was a productive mix of learning and coding. I’m excited to continue this journey, diving deeper into DSA, building more projects in React, and solving even more LeetCode challenges.

Tomorrow, I plan to explore more complex data structures and work on improving my React skills. Stay tuned for updates, and feel free to follow along with my progress!

Check out the Day 1 code on GitHub

What did you work on today? I’d love to hear about your coding journey in the comments below. Let’s keep each other motivated throughout this challenge!

0
Subscribe to my newsletter

Read articles from Ganesh Nitalikar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ganesh Nitalikar
Ganesh Nitalikar

👋 Hi, I'm Ganesh Nitalikar – a passionate software developer with a strong foundation in Java, Flutter, and front-end technologies like HTML, CSS, and JavaScript. As a recent BE(CS) graduate, I'm on a journey to expand my skills, currently diving deep into React and exploring the world of modern web development. 🚀 I'm driven by a love for coding and problem-solving, and I enjoy building intuitive and impactful applications. Whether it's crafting seamless mobile experiences with Flutter or creating dynamic user interfaces with React, I thrive on turning ideas into reality. 💡 My projects include innovative apps like ReelRave, a short video sharing platform, and Chatticure, a medical chatbot. I believe in continuous learning and am always eager to take on new challenges that push the boundaries of my knowledge.