💻 Practicing Binary to Decimal Conversion using Java Today I worked on converting a binary number into its decimal equivalent using logic and iteration. 🔍 Key Learnings: Understanding how binary digits map to powers of 2 Strengthening loop and mathematical logic Improving problem-solving skills step by step Instead of just memorizing, I focused on understanding the logic deeply and practicing with different inputs. 📌 Example: Binary: 1010 → Decimal: 10 Consistency + Practice = Progress 🚀 #Java #DSA #CodingJourney #Programming #100DaysOfCode #LearnToCode #ProblemSolving #DeveloperJourney #CodingPractice #TechSkills
Converting Binary to Decimal in Java with Logic and Practice
More Relevant Posts
-
Day 65 of #100DaysOfLeetCode 💻✅ Solved “Majority Frequency Group” problem in Java. Approach: • Created a frequency array of size 26 for all characters • Counted occurrences of each character in the string • For each unique frequency, counted how many characters share that frequency • Selected the frequency with the highest group size • In case of tie, chose the higher frequency • Built the result string with characters having the selected frequency Performance: ✓ Runtime: 5 ms (Beats 57.84% submissions) ✓ Memory: 44.51 MB (Beats 72.88% submissions) Key Learning: ✓ Practiced frequency grouping techniques ✓ Learned how to handle tie-breaking conditions ✓ Strengthened logic building with nested loops and conditions Learning one problem every single day 🚀 #Java #LeetCode #DSA #Strings #Hashing #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Understanding the difference between shallow copy and deep copy in Java really changed how I think about object handling and memory. A shallow copy duplicates the reference — meaning changes in one object can unexpectedly affect another. On the other hand, a deep copy creates an entirely independent object with its own memory allocation. This concept might seem small at first, but it becomes critical when working with complex data structures, real-world applications, and avoiding unintended side effects. Key takeaway: Always be clear whether you're copying data or just references. #Java #Programming #Learning #DSA #SoftwareDevelopment
To view or add a comment, sign in
-
-
🚀 DSA Learning Journey | Day 9 | Java Solved “125. Valid Palindrome.” 💡 Key Idea: Used Two Pointers while ignoring non-alphanumeric characters and comparing characters in a case-insensitive way. ⚙ Implementation • Language: Java • Time Complexity: O(n) • Space Complexity: O(1) 📚 Learning how two-pointer technique simplifies string validation problems. #Java #DSA #LeetCode #ProblemSolving #TwoPointers #JavaDeveloper
To view or add a comment, sign in
-
-
Today I implemented Array Reversal in Java using the Two-Pointer Technique! 🔄 Logic: ∙ Set left = 0 and right = arr.length - 1 ∙ Swap elements at both ends ∙ Move pointers inward until they meet ✅ Input: {1, 2, 3, 4, 5} ✅ Output: 5 4 3 2 1 💡 Why Two-Pointer? Instead of using extra space, we swap in-place — making it O(n) time and O(1) space! No extra array needed. Just two pointers doing the work. 💪 Every small concept I practice brings me one step closer to DSA mastery. Keep building. Keep learning. 🙌 #100daysofcode #dsa #java #program #array #problem #leetcode #javadeveloper #learning
To view or add a comment, sign in
-
-
Solved “Valid Anagram” problem in Java today 💻 Learned how to efficiently check if two strings are anagrams using: • Sorting approach (clean but O(n log n)) • Frequency array approach (optimized O(n)) 🚀 Key takeaway: Choosing the right approach can significantly improve performance, especially for large inputs. Consistent practice with DSA is helping me strengthen problem-solving skills and think in terms of optimization. #Java #DSA #LeetCode #ProblemSolving #CodingJourney #Programming
To view or add a comment, sign in
-
-
🚀 100 Days Java + DSA Challenge | Day 2 Today’s focus was on strengthening my programming fundamentals by covering: 🔹 Operators in Java (Arithmetic, Relational, Logical, Assignment) 🔹 Conditional Statements (if, if-else, nested if, switch) Understanding how operators work and how decisions are made in code is essential for building strong logic. These concepts are the backbone of problem-solving in Data Structures and Algorithms. 💡 Practiced writing multiple programs using conditions and improved my logical thinking step by step. Consistency is the key — small progress every day leads to big results. #100DaysOfCode #Java #DSA #LearningJourney #Coding #SoftwareDevelopment
To view or add a comment, sign in
-
Day 44-What I Learned In a Day(JAVA) Today I revised pattern programming in Java to strengthen my core logic and understanding of loops. What I practiced: • Star patterns • Number patterns • Pyramid patterns • Inverted patterns • Nested loop logic Pattern programming helped me improve: • Loop control (for/while) • Logical thinking • Understanding of rows & columns Every pattern I solve makes my logic stronger step by step. Consistency is the key #Java #CodingJourney #PatternProgramming #Learning #StudentDeveloper
To view or add a comment, sign in
-
🚀 DSA in Java – Day 84 Today’s problem was all about matrix rotation and pattern matching 🧠💡 🔍 Problem: Determine whether a given matrix can be rotated (0°, 90°, 180°, 270°) to match a target matrix. 💡 Key Learning: Matrix rotation is a pattern-based transformation problem Instead of manually checking all possibilities, we can: ✔ Rotate the matrix step by step ✔ Compare after each rotation Clean logic + iteration = efficient solution 🛠 Approach: Rotate matrix 4 times (0°, 90°, 180°, 270°) After each rotation, check if it matches the target If match found → return true, else false 📈 What I improved today: Matrix manipulation skills Thinking in rotations & transformations Writing clean and reusable functions 🔥 Consistency is the key! Day 84 done, moving closer to mastery. #DSA #Java #100DaysOfCode #CodingJourney #LeetCode #ProblemSolving #WomenInTech
To view or add a comment, sign in
-
-
Day 63 of #100DaysOfLeetCode 💻✅ Solved #2085. Count Common Words With One Occurrence problem in Java. Approach: • Iterated through each word in the first array • Avoided duplicate checks by ensuring each word is processed only once • Counted occurrences of the current word in both arrays • If the word appears exactly once in both arrays, incremented the result • Returned the final count Performance: ✓ Runtime: 88 ms (Beats 7.45% submissions) ✓ Memory: 46.06 MB (Beats 93.07% submissions) Key Learning: ✓ Practiced handling duplicates and frequency counting ✓ Improved understanding of string comparison in arrays ✓ Learned importance of optimizing nested loop solutions Learning one problem every single day 🚀 #Java #LeetCode #DSA #Strings #Arrays #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 15 of #DSAwithEdSlash Solved: Bulb Switcher 💡 Today’s problem looked simple at first but had a really interesting mathematical insight behind it. Instead of simulating all the toggles, the key realization is that only perfect squares remain ON after all rounds. 💡 Key Takeaways: Importance of pattern recognition 🔍 Optimization using mathematical logic instead of brute force Counting perfect squares ≤ n gives the answer 📊 Result: ⚡ Optimized Time Complexity: O(√n) 💻 Efficient Java implementation Consistency is building confidence day by day 💪 #Day15 #DSA #LeetCode #Java #ProblemSolving #CodingJourney #Consistency #PlacementPrep
To view or add a comment, sign in
-
Explore related topics
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