100 Days of Code - Day 17: LeetCode XOR After Queries and Spring Boot Lambda & Stream API

🚀 #100DaysOfCode – Day 17 Consistency is turning into confidence. Showing up daily 🔥 ✅ What I accomplished today: 🧠 LeetCode Daily Challenge – XOR After Queries 📌 Problem Overview: You are given an array and a list of queries. Each query contains: left, right → range k → step increment value → multiplier 👉 For each query: ✔ Update elements from left to right with step k ✔ Multiply each selected element by value Finally, compute the XOR of the entire array 💡 My Approach (Simulation): 🔹 Iterated through each query 🔹 For every query: ✔ Started from left ✔ Jumped with step k until right ✔ Applied multiplication with modulo (10^9 + 7) 🔹 After processing all queries: ✔ Calculated final XOR of array ⚡ Time Complexity: 👉 O(Q * (N / K)) in worst case ⚡ Space Complexity: 👉 O(1) 🧩 Key Insights: ✔ Step-based traversal reduces unnecessary operations ✔ Careful handling of large numbers using modulo ✔ XOR aggregation at the end is straightforward but important ✔ Simulation works, but optimization scope exists (future improvement 🚀) 🔗 LeetCode Submission Link: https://lnkd.in/gZKCZf87 ☕ Spring Boot Learning – Lambda & Stream API Today I explored one of the most powerful features in modern Java 💡 📌 Key Concepts Covered: ✔ Introduction to Lambda Expressions ✔ Writing concise and readable functional code ✔ Using Stream API for data processing ✔ Performing operations like: filter() map() forEach() collect() ✔ Converting collections into streams for clean transformations 🌍 Why This Matters: ✔ Reduces boilerplate code ✔ Improves readability and maintainability ✔ Encourages functional programming style ✔ Makes data processing more expressive and efficient 🧠 Big Learning: Writing less code doesn’t mean doing less— it means writing smarter, cleaner, and more expressive code. 🔥 Learning Streak: Day 17/100 Discipline today → Results tomorrow 🚀 #100DaysOfCode #Java #SpringBoot #BackendDevelopment #LeetCode #DSA #ProblemSolving #CodingJourney #SoftwareDevelopment #LearningInPublic #Developers #Consistency #BuildInPublic

  • text

To view or add a comment, sign in

Explore content categories