🧠 Java Logic + SQL Concept Practice Today I focused on strengthening basic logic through small problems. ✔️ Counted even numbers in an array ✔️ Found the largest element ✔️ Calculated string length without using built-in methods Also revisited a key SQL concept around JOINs, especially understanding which JOIN returns all rows from the left table. These small exercises help improve logical thinking and deepen understanding of core concepts. #Java #SQL #DSA #ProgrammingFundamentals #LearningInPublic
Java Logic & SQL Practice: Counting, Largest Elements & JOINs
More Relevant Posts
-
Day 67 — LeetCode Progress (Java) Problem: Insert Delete GetRandom O(1) Goal: Design a data structure that supports: Insert Delete Get Random All in O(1) time Idea: You can’t rely on just a set or list — you need both speed + index access. Approach: Use: ArrayList → for O(1) random access HashMap → value → index mapping Insert:If value exists → return false Else: Add to list Store index in map Remove:If value not present → return false Else: Swap it with last element in list Update map for swapped element Remove last element Delete from map GetRandom:Generate random index Return element from list Time Complexity: O(1) for all operations Space Complexity: O(n) #LeetCode #DSA #Java #HashMap #ArrayList #SystemDesign #CodingJourney
To view or add a comment, sign in
-
-
Day 50 — LeetCode Progress (Java) Problem: Range Sum Query – Immutable Required: Design a data structure that can return the sum of elements between indices left and right (inclusive) efficiently for multiple queries. Idea: Precompute a prefix sum array so each query can be answered in O(1) time instead of recalculating sums repeatedly. Approach: Build a prefix array where: prefix[i] = sum of elements from index 0 to i During initialization: Traverse the array once Keep a running sum and store it in prefix For each query sumRange(left, right): If left == 0 → return prefix[right] Else → return prefix[right] - prefix[left - 1] Time Complexity: Preprocessing: O(n) Query: O(1) Space Complexity: O(n) #LeetCode #DSA #Java #PrefixSum #Algorithms #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Java Arrays: The Ultimate Building Blocks Before building complex data structures, the foundation needs to be rock solid. Arrays are the ultimate building blocks. Today, I locked down the 4 core operations: 1. Declare: Reserving contiguous memory. 2. Initialize: Populating the data. 3. Access: The magic of O(1). 4. Traverse: Looping through the elements. The biggest takeaway? Understanding fixed memory allocation in Java is crucial before moving to dynamic structures like ArrayLists or HashMaps. #DSA #Java #ArrayBasics
To view or add a comment, sign in
-
-
🔥 ORM vs Raw SQL — Ek baar samjho, hamesha ke liye clear ho jao. ORM = Less code, faster dev, but less control. Raw SQL = More control, better performance, more effort. Neither is wrong. Knowing WHEN to use which — that's the real skill. 🎯 Save this. #BackendDev #Java #SQL #SpringBoot #100DaysOfCode #ProgrammingTips
To view or add a comment, sign in
-
-
Did you know Spring Data JPA can generate SQL queries just from method names? 😳 In this video, I explain how this method: findFirstByStatusOrderByTokenNumberAsc() automatically generates: SELECT * FROM token_queue WHERE status = 'WAITING' ORDER BY token_number ASC LIMIT 1; This is used to fetch the next available token in a queue system. Full explanation available in TamilKadal YouTube channel Link in the first comments section #SpringBoot #Java #JPA #Hibernate #BackendDevelopment #Programming #Coding #Developer #SoftwareEngineering #Tech #JavaDeveloper #LearnCoding
To view or add a comment, sign in
-
🗄️ Database Optimization is a Game Changer Earlier, I focused only on Java code. But real performance issues often come from DB. Lessons I learned: ✔ Avoid unnecessary queries ✔ Use indexes wisely ✔ Don’t fetch everything 👉 Backend performance = Code + Database Ignoring DB = slow applications. Do you spend time optimizing queries? #SQL #BackendDevelopment #Java
To view or add a comment, sign in
-
Most developers “use” JDBC… but very few actually understand it. ⚠️ You write: ✔ Queries ✔ APIs ✔ Backend logic But do you know: 👉 How data actually flows? 👉 Why is PreparedStatement critical? 👉 When to use transactions or batch processing? This carousel breaks down JDBC into: Simple visuals 🧠 Real-world examples 💻 Interview-ready concepts 🎯 👉 If you're serious about backend development — this is NOT optional. 💾 Save this. You’ll need it before interviews. Which JDBC concept was the most challenging for you? 👇 1️⃣ PreparedStatement vs Statement 2️⃣ ResultSet 3️⃣ Transactions 4️⃣ Batch Processing Comment your number 👇 #Java #JDBC #BackendDevelopment #SoftwareEngineering #Programming #JavaDeveloper #Coding #LearnToCode #TechCareers #Developers #SystemDesign #Database #SQL #InterviewPrep #CodingTips #100DaysOfCode #TechLearning #CodeNewbie #ProgrammingLife
To view or add a comment, sign in
-
🚀 Day 35/50 – #50DaysOfCode Today, I learned about array concatenation, array slicing, and multidimensional arrays in Java, along with how to iterate over multidimensional arrays. These concepts help in handling complex data structures more efficiently. ☕💻 #Day35 #JavaFullStack #Java #CCBP #NxtWave #LearningJourney #Consistency
To view or add a comment, sign in
-
🚀 Day 2 of My Advanced Java Journey – JDBC Deep Dive Today, I explored deeper into JDBC, focusing on retrieving data, scrollable ResultSets, and metadata. 🔹 Retrieving Data from ResultSet JDBC provides multiple methods to fetch data from each column. We can retrieve data using: Column Index (int) Column Name (String) 👉 Common methods: getInt() getString() getFloat() getDouble() ✔️ Example concept: Using while(res.next()), we can iterate through rows and fetch values like id, name, designation, and salary. 🔹 Scrollable ResultSet (TYPE_SCROLL_SENSITIVE) Unlike normal ResultSets, scrollable ResultSets allow moving the cursor in multiple directions. 👉 Important methods: beforeFirst() afterLast() first() last() next() previous() absolute(int row) 💡 Helps in flexible data navigation. 🔹 ResultSet Metadata Metadata means data about data. Using ResultSetMetaData, we can get: Number of columns → getColumnCount() Column names → getColumnName(int column) Column types → getColumnType(int column) 🔍 What I explored beyond the session Difference between TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, and TYPE_SCROLL_SENSITIVE Importance of CONCUR_READ_ONLY vs CONCUR_UPDATABLE Additional methods like getBoolean(), getDate(), getLong() Why column names are preferred over index (better readability & maintainability) 💡 Mastering ResultSet handling makes JDBC much more powerful for real-world backend applications. 🙌 Special thanks to the amazing trainers at TAP Academy: kshitij kenganavar Sharath R MD SADIQUE Bibek Singh Hemanth Reddy Vamsi yadav Harshit T Ravi Magadum Somanna M G Rohit Ravinder TAP Academy 📌 Learning in public. Growing every day. #Java #AdvancedJava #JDBC #BackendDevelopment #LearningInPublic #100DaysOfCode #VamsiLearns
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development