Like every language, Rust also has loop system to iterate over array. In my Rust learning journey, I found many similarities between Java and Rust in terms loops and there are also a new kind of loop in Rust. . Like java, Rust has for-loop, for-each loop, while loop. . Rust has a new kind of loop called "loop" that is equivalent to "while(true)" in java. Rust doesn't have do-while but it can be achieved with while loop. . #programming #java #rust #developer #coding #backendDevelopment #SoftwareEngineering #learning #coding
Rust loops: similarities with Java and a new kind
More Relevant Posts
-
Today marks Day 25 of my Java learning journey — and today's topic took my understanding of array traversal and pattern detection a step further! I explored how to find the smallest and largest repeating elements in a sorted array, but this time, by traversing from the last element to the first — a reverse approach that really deepened my logic-building skills. In most array problems, we move from start to end, but reversing the direction helps us analyze problems differently. While implementing this logic, I learned how: Reverse traversal can directly identify the largest repeating element first, saving time in certain cases. The smallest repeating element can still be determined efficiently while looping backward. Writing separate methods (functions) improves readability and makes the code modular, reusable, and easy to test. This exercise reminded me that in programming, sometimes changing the direction of thought — quite literally — opens up a new perspective for optimization. 🔁💡 #Java #Day25 #Programming #LearningJourney #Coding #SoftwareDevelopment #Arrays #ProblemSolving #LogicBuilding #ReverseTraversal #DataStructures #LearningEveryday
To view or add a comment, sign in
-
🚀 Day 140 of #150DaysOfCode on LeetCode Solved: 1526. Minimum Number of Increments on Subarrays to Form a Target Array Language: Java The task was to determine the minimum number of subarray increment operations needed to build the target array from all zeros. 🔹 Intuition: Every time the current element is greater than the previous one, it means we need that many new operations to reach the next level. Decreases don’t add extra work since earlier increments already cover them. 🔹 Approach: Start with the first element’s value as the initial count. For each subsequent element, if it’s larger than the previous one, add the difference. The sum of all such differences gives the minimum number of operations required. 🔹 Complexity: Time: O(n) Space: O(1) #LeetCode #150DaysOfCode #Java #CodingChallenge #ProblemSolving #Greedy #Arrays #DSA #TechLearning #Programmer #WomenInTech #CodeJourney #DynamicProgramming
To view or add a comment, sign in
-
-
Today marks Day 27 of my Java learning journey — and today, I focused on solving the problem of removing duplicates from a sorted array using an optimized in-place approach — without using any extra space. Instead of creating a new array, I applied the two-pointer technique — one pointer to traverse (read) through the array and another to track (write) the position where the next unique element should be placed. Each time a new distinct value appeared, it was written at the current write index, effectively overwriting duplicates as the array was scanned. This approach reduced the space complexity to O(1) while maintaining a clean O(n) time complexity. What made this problem truly interesting was how a small change in perspective — using two moving pointers instead of nested loops — made the solution both elegant and efficient. It was a great reminder that optimization often lies in logic, not in length of code. 💡 #Java #Day27 #LearningJourney #Programming #Coding #ProblemSolving #DataStructures #Algorithms #LogicBuilding #Optimization #SoftwareDevelopment #Efficiency #TwoPointers
To view or add a comment, sign in
-
💥 Unpopular Opinion: Learning 10 programming languages won’t make you a better developer. Everyone flexes “I know Python, C++, Java, C#, PHP, and Rust.” Cool. But can you build something that actually works? The truth? Most devs learn languages they’ll never use again not because they’re bad, but because they’re chasing hype over mastery. 🔥 Mastering one language deeply (writing scalable, secure, production-level code) will take you further than knowing ten at surface level. So here’s my take: Stop chasing new syntax. Start mastering problem-solving. Your turn 💭 What’s a programming language you learned… but never touched again? #Programming #Developers #SoftwareEngineering #TechDebate #CodingCommunity #LearnToCode #DevThoughts
To view or add a comment, sign in
-
-
🚀 Understanding the Difference Between “For Loop” and “While Loop” in Java! 💻 Loops are the heart of programming ❤️ — they help us repeat tasks efficiently without writing the same code again and again! 🔹 For Loop – Perfect when you know exactly how many times you need to iterate. 🔹 While Loop – Ideal when the number of iterations is not known in advance. Both are powerful in their own ways — it’s all about choosing the right tool for the right situation! ⚙️ 📘 Keep learning, keep coding, and make logic your superpower! 💪✨ #Java #Programming #Coding #LoopsInJava #CodeganeITSolutions Anand Kumar Buddarapu sir Saketh Kallepu sir
To view or add a comment, sign in
-
-
Simple, but effective! I built a Student Grade Tracker in Java. 📊 by #CodeAlpha This project uses an ArrayList to store custom Student objects and calculates key metrics like the class average, highest grade, and lowest grade. It highlights strong foundational skills in Java and OOP. On to the next project! 📂 GitHub Repository: https://lnkd.in/eJ_94gi7 #JavaDeveloper #Coding #Programming #PortfolioProject
To view or add a comment, sign in
-
I like to think of programming languages as falling into three tribes 👇 🐍 The Scripters – Fast, flexible, and forgiving. Perfect for automating tasks or spinning up quick prototypes. Python leads the pack here. 🏭 The Builders – Enterprise-grade, GC-powered, and structured for scale. Think Java, C#, or even Go — the backbone of many production systems. ⚡ The Performers – Close to the metal, no safety nets, but ultimate control. Rust is my personal favorite here — modern power with fewer headaches than C/C++. Different philosophies, same mission: turning ideas into working systems. Which tribe do you code with most often? 👨💻 #Programming #SoftwareEngineering #Developers #Coding #Python #GoLang #Rust #CSharp #Java #WebDevelopment #SoftwareEngineering #Backend #Developers #SystemDesign
To view or add a comment, sign in
-
🔥 Day 84 of #100DaysDSAChallenge 📌 Topic: Array — Squares of a Sorted Array ✅ Problem Solved on #LeetCode: 977. Squares of a Sorted Array (🟢 Easy) 💡 Key Learnings: • Strengthened understanding of the two-pointer technique for sorted array manipulation. • Learned to efficiently handle both negative and positive numbers when squaring values. • Optimized time complexity from O(n²) to O(n) by eliminating nested loops. • Enhanced focus on writing clean, readable, and efficient Java code. 🚀 Consistency Builds Clarity: Every problem you solve sharpens your logical thinking and builds confidence. Keep learning, improving, and moving forward — one problem at a time 💪 🏷️ #Day84 #100DaysChallenge #100DaysDSAChallenge #LeetCode #Java #CodingChallenge #ProblemSolving #DataStructures #Algorithms #Arrays #Programming #LearningJourney #10kCoders #10000Coders #Consistency #LogicBuilding
To view or add a comment, sign in
-
-
💡 Why Problem-Solving Matters More Than Knowing Every Language A while back, I worked with a developer who proudly listed ten programming languages on his profile. He knew them all — Python, Java, Go, Rust… you name it. But when we hit a production bug, it wasn’t his knowledge of ten languages that saved us. It was the ability to think through the problem. That’s when I realized: 👉 Great engineers aren’t defined by how many languages they know. They’re defined by how well they solve problems. Frameworks change. Syntax evolves. But the skill of breaking down complex issues, asking the right questions, and building logical solutions — that never goes out of style. Once you master problem-solving, learning new languages becomes easy. They’re just different ways of expressing the same logic. So instead of collecting frameworks like trading cards, focus on building your thinking muscle. That’s what truly makes you stand out as an engineer. Because at the end of the day, code is just a tool — your brain is the real compiler. 🧠💻 Read full article here : https://lnkd.in/gYJkvmQp #SoftwareEngineering #ProblemSolving #CodingMindset #DevelopersLife #EngineerGrowth #TechCareers #LearningInPublic #Programming #MindsetMatters #ContinuousLearning
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