🚀 Learning Java the Right Way Today, I practiced another interesting Java logic problem — Armstrong Number. An Armstrong number is a number where the sum of the cubes of its digits is equal to the number itself. For example: 153 → 1³ + 5³ + 3³ = 153 ✅ 🔹 Approach: *Store the original number *Extract each digit using % 10 *Cube the digit and add to sum *Compare the result with the original number This problem improves: ✔ Loop control ✔ Digit extraction logic ✔ Mathematical thinking ✔ Problem-solving confidence Practicing such number-based problems helps build a strong foundation for coding interviews and logical reasoning. 📌 Strong basics • Clean logic • Confident Java foundation 💡 #java #javafullstack #javadeveloper #corejava #codingjourney #coding
Java Armstrong Number Problem Solution and Learning
More Relevant Posts
-
🚀 Day 30 / 180 – DSA with Java 🚀 📘 Topic Covered: Strings & Sorting Technique 🧩 Problem Solved: Longest Common Prefix Problem: Given an array of strings, find the longest common prefix shared among all the strings. Approach: Sorted the array of strings and compared only the first and last strings. Since sorting groups similar prefixes together, the common prefix between these two strings represents the common prefix for the entire array. Key Learning: ✔️ Using sorting to simplify string comparison problems ✔️ Observing patterns to reduce unnecessary checks ✔️ Efficient prefix detection in string arrays If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Strings #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🚀 Day 14 – Solving Array Challenges in Java Not every day is about learning a new concept. Some days are about strengthening what we already know by solving more challenges 💪 Today, I focused on solving multiple array-based problems to improve my logical thinking and problem-solving skills in Java. 🧩 Problems I Solved: ✔ Find the Sum and Average of all elements in an array ✔ Count the Number of Occurrences of a specific element ✔ Find the Maximum and Minimum element in an array ✔ Check whether the given array is Sorted ✔ Create a new array after Deleting a specific element 🛠 Skills Improved: • Loop mastery (for, while) • Conditional logic • Array traversal techniques • Edge case handling • Writing clean and modular code 💡 Key Takeaway: Consistency matters more than speed. Every small challenge solved builds stronger fundamentals in programming. Step by step improving problem-solving ability and confidence in Core Java 🚀 #100DaysOfCode #Java #CoreJava #DSA #ProblemSolving #Arrays #DataStructures #Programming #CodingJourney #DeveloperLife #SoftwareDeveloper #BackendDeveloper #JavaDeveloper #LearningJourney #TechSkills
To view or add a comment, sign in
-
-
🚀 Day 27 / 180 – DSA with Java 🚀 📘 Topic Covered: Strings & Reverse Traversal 🧩 Problem Solved: Length of Last Word Problem: Given a string containing words separated by spaces, find the length of the last word. Approach: Started traversing the string from the end, skipped trailing spaces first, and then counted characters until encountering another space or reaching the beginning of the string. Key Learning: ✔️ Efficient reverse traversal in strings ✔️ Handling edge cases like trailing spaces ✔️ Writing simple yet optimized string logic If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Strings #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Built a Java program to classify user input 💻 Used Scanner for taking input from user. Extracted character using charAt(0). Checked if input is alphabet, digit, or special character. Handled both uppercase and lowercase cases. Applied if-else logic effectively. Improved understanding of Java fundamentals. Practiced clean and structured coding. Strengthening logic building step by step 🚀 Consistency leads to better problem-solving skills 🔥 #Java #JavaProgramming #CodingJourney #LearnToCode #StudentDeveloper #ProgrammingBasics #LogicBuilding #TechSkills #VSCode #100DaysOfCode
To view or add a comment, sign in
-
-
Day 27 of #100DaysOfLeetCode 💻✅ Solved #83. Remove Duplicates from Sorted List on LeetCode using Java. Approach: • Utilized the fact that the linked list is already sorted • Traversed the list using a single pointer • Compared current node value with next node value • If duplicate found, skipped the next node by updating links • Continued traversal until reaching the end of the list Performance: ✓ Runtime: 0 ms (Beats 100% submissions) ✓ Memory: 45.30 MB (Beats 85.70% submissions) Key Learning: ✓ Understood how sorting simplifies duplicate removal logic ✓ Strengthened pointer manipulation skills in linked lists ✓ Learned efficient in-place modification without extra space Learning one problem every single day 🚀 #Java #LeetCode #DSA #LinkedList #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 DSA in Java – Day 76 ✅ Today I solved the “Check if Binary String Has at Most One Segment of Ones” problem on LeetCode. 💡 Problem Idea: Given a binary string, we need to check whether there is at most one continuous segment of '1's in the string. 🧠 Approach: Traverse the string using a loop. Count how many segments of '1' appear. If the count becomes greater than 1, return false. Otherwise return true. ⚡ Key Concepts Practiced: String traversal While loop Character comparison Logical conditions Consistency in solving problems every day is helping me strengthen my problem-solving and logical thinking skills in Java. #DSA #Java #LeetCode #ProblemSolving #CodingJourney #WomenInTech #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 34 / 180 – DSA with Java 🚀 📘 Topic Covered: Arrays & Basic Construction 🧩 Problem Solved: Concatenation of Array Problem: Given an integer array nums, create a new array that contains the elements of nums twice in sequence. Approach: Created a new array with double the size of the original array and filled the first half with the original elements, then copied the same elements again into the second half. Key Learning: ✔️ Practicing array construction and indexing ✔️ Understanding how to manipulate array sizes ✔️ Writing clean logic for simple transformation problems If you’re also preparing for DSA, let’s connect and learn together 🤝 #DSA #Java #180DaysOfCode #LearningInPublic #Arrays #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Most developers use control statements. But not everyone truly understands how they control program flow. Here’s a complete cheat sheet covering: ✔ if & switch (Decision Making) ✔ for, while, do-while (Looping) ✔ Enhanced for (for-each) ✔ break & continue ✔ Big-O complexity insights Whether you're: • Preparing for Java interviews • Revising core fundamentals • Teaching Java • Or building logic clarity Mastering control flow = mastering programming thinking. Which loop do you use the most in real projects — for or while? 👇 Save this for revision. Share with someone learning Java. Follow @BodiliYashwanthSai for deep Java concepts. #Java #JavaDeveloper #CoreJava #Programming #SoftwareEngineering #Coding #Developers #DataStructures #BigO #TechLearning #LearnToCode #100DaysOfCode #JavaInterview #BackendDevelopment #ComputerScience
To view or add a comment, sign in
-
-
Day -9📝 🔹 Understanding Variables in Java Every strong programmer starts with strong fundamentals — and variables are the foundation of programming in Java. A variable is a named memory location used to store data during program execution. It consists of: ✅ Data Type ✅ Variable Name ✅ Value Example: int age = 20; Key Reminders: ✔ Java is case-sensitive ✔ Use meaningful variable names ✔ Every variable must declare a data type ✔ Variables are classified as Local, Instance, and Static Mastering variables makes it easier to understand: 🔹 Control Statements 🔹 Methods 🔹 Object-Oriented Programming 🔹 Data Structures Step by step, building a strong coding foundation 💻🚀 #Java #JavaProgramming #ProgrammingBasics #CodingJourney #ComputerScience #DeveloperGrowth
To view or add a comment, sign in
-
-
💡 Ever wondered what actually happens when you run javac in Java? Most developers write Java programs every day, but many don’t fully understand what happens behind the scenes when the Java compiler processes our code. To help beginners and aspiring developers understand this clearly, I created a video where I explain how the Java compiler works step by step in a very simple way. In this video, I cover: 🔹 Lexical Analysis – How the compiler breaks code into tokens 🔹 Syntax Analysis – How Java checks the structure of the program 🔹 Semantic Analysis – How the compiler verifies the meaning and correctness of the code 🔹 How the .java file is finally converted into bytecode (.class file) My goal was to explain these concepts in the simplest possible way so that beginners can easily understand what happens inside the Java compiler. 🎥 Watch the full video here: https://lnkd.in/geqpDTAp If you are learning Core Java, Computer Science fundamentals, or preparing for interviews, understanding this process will give you a much stronger foundation. I’d love to hear your feedback after watching! #Java #CoreJava #JavaCompiler #Programming #SoftwareEngineering #LearnJava #ComputerScience #Coding
How Java Compiler Works? | Lexical, Syntax & Semantic Analysis
https://www.youtube.com/
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