#Day26 – String Programming (Cont.) -#Programming⚠️ Today’s session was all about understanding how to actually think while solving string problems, not just writing code. I worked on breaking a string into individual characters and applying logic step by step. Learned how to count vowels properly, including handling uppercase and lowercase cases which initially caused errors. Also understood why some simple-looking approaches fail, especially when we ignore different types of characters like numbers and special symbols. One important concept was identifying character types using ranges, which helped in separating alphabets, numeric values, and special characters correctly. TAP Academy Harshit T Somanna M G #Java #Strings #ProblemSolving #CodingJourney #Consistency
More Relevant Posts
-
🔥 Day 36 of #LeetCode Journey ✅ Problem: Minimum Distance Between Three Equal Elements I Today’s problem was about finding the minimum distance between three equal elements in an array. 💡 Key Idea: Instead of checking all combinations, we track indices efficiently: Store the last two occurrences of each number When a third occurrence appears, calculate the distance Keep updating the minimum distance 🧠 What I Learned: Optimizing from brute force to O(n) approach Using HashMap effectively for tracking indices Thinking in terms of patterns instead of combinations ⚡ Time Complexity: O(n) ⚡ Space Complexity: O(n) 🔍 Example: Input: [1,2,1,1,3,1] Output: 3 Small optimizations make a big difference 💡 Staying consistent and improving every day! #Java #DSA #LeetCode #CodingJourney #100DaysOfCode #Programming #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 76 — LeetCode Practice 🚀 Today’s problem: Count the Number of Consistent Strings 💡 What I learned today: • Used a boolean array to efficiently track allowed characters • Practiced character indexing (c - 'a') technique • Improved understanding of string traversal using nested loops • Learned how to optimize lookup operations to O(1) 🧠 Key Idea: Store all allowed characters in a boolean array. Then, for each word, check if every character exists in the allowed set. If yes → count it as a consistent string ✅ ⚡ Approach Highlights: • Preprocessing allowed characters • Iterating through each word • Breaking early for invalid characters (optimization) • Counting only valid strings 💻 Language Used: Java Consistency is the key 🔑 — improving step by step every day! #Day76 #LeetCode #Java #CodingJourney #ProblemSolving #100DaysOfCode #Programming #Learning
To view or add a comment, sign in
-
-
We have executed below areas in Ruby Programming Language, Ruby-Blocks - Completed (4 testcases) Modules&Mixins- Completed (3 testcases) Strings- Completed (2 testcases) Arrays- Completed (6 testcases) Hashes-Completed (3 testcases) Date&Time-Completed (6 testcases) Ranges-Completed (4 testcases) Total - 28testcases Attached screenshot can be referred for Successful outcome. #rubyasprogram #rubyprogramming #testexecution
To view or add a comment, sign in
-
-
Day 31- What I Learned In a Day(JAVA) Today, I learned about nested for loops and how they are used in pattern programming. A nested loop is simply a loop inside another loop. The outer loop controls the number of rows, while the inner loop controls what gets printed in each row (columns). 🔹 Outer loop → runs row by row 🔹 Inner loop → runs completely for each row 🔹 This helps in creating patterns like squares, triangles, and pyramids For every single iteration of the outer loop, the inner loop executes fully this is the key idea behind pattern problems. Understanding this concept improved my ability to break down problems step by step and visualize output clearly. I Practiced 16 Patterns 👇 #Java #Programming #Coding #LearningJourney #NestedLoops #PatternProgramming
To view or add a comment, sign in
-
🔥 Day 13/100 Days Coding Challenge ✅ Problem Solved: Max Consecutive Ones Today’s problem was about finding the maximum number of consecutive 1’s in a binary array. 💡 Key Idea: Traverse the array, count consecutive 1’s, and reset when encountering 0 — while tracking the maximum count. 🧠 What I Learned: Importance of maintaining a running count Using Math.max() efficiently Solving problems in O(n) time with constant space 💻 Approach: Initialize count = 0, max = 0 Loop through array If element is 1 → increment count Else → reset count Update max at each step Consistency is key 🔑 — small steps every day lead to big results! #Day13 #100DaysOfCode #Java #DSA #CodingChallenge #LeetCode #ProblemSolving
To view or add a comment, sign in
-
-
Day 13 of #LeetCode75 Complete! 75 Days of Coding Topic: Sliding Window Problem: Maximum Average Subarray I Today, I attempted the Maximum Average Subarray I problem on LeetCode using the Java programming language. The problem required me to find the maximum average value among all possible contiguous subarrays of size 𝑘. 🔍 Approach: I did not use the sliding window technique to find the solution to the problem. Instead, I implemented the optimized solution using the prefix sum technique: I created the prefix sum array to store the cumulative sum. I computed the sum of the subarray using the formula: prefix[i] - prefix[i - 𝑘] and divided the maximum sum by 𝑘. 📚 What I learned: I learned how to use the prefix sum array to store the cumulative sum. I learned how to avoid redundant calculations. I learned the different techniques that could be implemented to solve the sliding window problems. 📌 Key Insight: The prefix sum array is helpful in avoiding redundant calculations. #LeetCode75 #LeetCode #Java #DS #SlidingWindow #ProblemSolving
To view or add a comment, sign in
-
-
We have executed below areas in Ruby Programming Language, Ruby-Multithreading - Completed (5 testcases) Built-in Functions- Completed (3 testcases) Miscellaneous-Completed (14 testcases) Total - 22testcases Attached screenshot can be referred for Successful outcome. #rubyasprogram #rubyprogramming #testexecution
To view or add a comment, sign in
-
-
🚀 Day 3 of My Java Full Stack Journey Today was all about loops — one of the most important concepts in programming 🔁 📌 What I learned: 🔹 While Loop * Used to repeat a block of code until a condition becomes false 🔹 Syntax: while(condition) { // code } 🔹 My Progress: * Practiced 50+ questions on while loop 💪 * Learned how iteration works step-by-step 👉 Loops help reduce repetition and make code efficient Consistency is the key — small steps daily 🚀 #LearningJourney #WhileLoop #CProgramming #Consistency
To view or add a comment, sign in
-
-
Building strong fundamentals, one concept at a time 💡 Understanding the true power of Java — from platform independence to portability — and how “Write Once, Run Anywhere” makes it a game-changer in the programming world. This journey is not just about coding, but about thinking, solving, and growing every day 🚀 #Java #TapAcademy #LearningJourney #Programming #FutureEngineer #TechSkills
To view or add a comment, sign in
-
-
🔹 Reverse Number in Java – Logic + Implementation Strong fundamentals are key to becoming a better developer. This example demonstrates how to reverse a number using simple mathematical operations: • Extract last digit using modulus (%) • Build the reversed number step by step • Reduce the number using division (/) Such problems help improve logical thinking and coding efficiency. 🎥 I’ve also created a short video explaining this concept with code: YouTube link : https://lnkd.in/gfaafZWZ #Java #Programming #ProblemSolving #Coding #SoftwareDevelopment #Learning
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