Today, I tackled a challenging DSA problem titled “Maximum Walls Destroyed by Robots.” This problem involved several key concepts: - Sorting - Binary Search (lower_bound / upper_bound) - Greedy + Dynamic Programming The core idea revolves around each robot having a specific range, with the objective of maximizing the number of walls covered while avoiding overlap conflicts between adjacent robots. Here’s what I implemented: - Utilized unordered_map to map each robot to its distance. - Applied binary search to efficiently determine reachable walls. - Maintained prefix decisions using Dynamic Programming: - subLeft: best result when the current robot contributes from the left - subRight: best result when the current robot contributes from the right A key learning from this experience was that optimizing overlapping ranges with constraints requires a combination of: - Local decisions for each robot's coverage - Global optimization through DP transitions This problem truly tested my ability to think in intervals, handle edge cases between adjacent elements, and optimize using the Standard Template Library effectively. Consistency and problem-solving lead to growth. #DSA #Coding #Cpp #LeetCode #ProblemSolving #SoftwareEngineering #FAANGPrep #POTD
Maximizing Walls Destroyed by Robots with DSA
More Relevant Posts
-
Day 68/150 🚀 LeetCode 657: Robot Return to Origin 🧠 Problem There is a robot starting at position (0,0). Given a sequence of moves, determine if the robot returns to the origin after completing all moves. 📌 Example Input → moves = "UD" Output → true Input → moves = "LL" Output → false 💡 Approach (Simulation) • Initialize x and y coordinates • Traverse the string of moves • Update position based on direction • Check if robot returns to origin (0,0) ⚡ Example Walkthrough Moves → "UDLR" U → y + 1 D → y - 1 L → x - 1 R → x + 1 Final Position → (0,0) ✅ ⏱ Time Complexity O(n) 📦 Space Complexity O(1) ✅ Result: Accepted ⚡ Runtime: 0 ms (Beats 100%) #Day68 #LeetCode #DSA #CodingJourney #ProblemSolving #Programming #SoftwareEngineering #DailyLeetCode
To view or add a comment, sign in
-
-
Day 95 Today’s problem: Robot Return to Origin (Easy) A simple yet insightful problem focused on movement tracking and coordinate logic. The idea is straightforward — simulate the robot’s moves and check whether it ends up back at the origin (0,0). 💡 Key Takeaways: Maintain two variables (x, y) to track position Each move updates coordinates accordingly Final check: if (x == 0 && y == 0), the robot returns to origin ✅ Clean logic > overthinking ⚡ Result: Accepted ✅ ⏱ Runtime: 0 ms (100% 💯) 📊 Memory: Room for improvement Even the “easy” problems reinforce fundamentals — and strong fundamentals win interviews. Consistency is the real game. On to Day 96 💪 #LeetCode #Programming #DSA #CodingJourney #Consistency #ProblemSolving
To view or add a comment, sign in
-
-
Open Source Robotic Arm for All Developers [📍Github Below] A robotic arm project (reBot-DevArm) dedicated to lowering the barrier to learning Embodied AI. They focus on "True Open Source" (not just the code), they unreservedly open source everything: > Hardware Blueprints: Source files for sheet metal parts and 3D printed parts. > BOM List: Detailed down to the specifications and purchase links for every single screw. > Software & Algorithms: Python SDK, ROS1/2, Isaac Sim, LeRobot, etc. Credit to the Seed Studio and thanks for reaching out, Elaine Wu! 📍GitHub: https://lnkd.in/dH4e8Vxp —- Weekly robotics and AI insights. Subscribe free: 22astronauts.com
To view or add a comment, sign in
-
-
Ilir Aliu Appreciate for bringing our fully open-source #reBot Arm to the robotics community—great to see it resonating with developers! reBot is launching this week, and you’re welcome to get early hands-on access by joining our local workshop in Santa Clara 👉 https://luma.com/ryqflfoc Looking forward to building together, and making robotics more accessible and easier in further development. 🤩
Open Source Robotic Arm for All Developers [📍Github Below] A robotic arm project (reBot-DevArm) dedicated to lowering the barrier to learning Embodied AI. They focus on "True Open Source" (not just the code), they unreservedly open source everything: > Hardware Blueprints: Source files for sheet metal parts and 3D printed parts. > BOM List: Detailed down to the specifications and purchase links for every single screw. > Software & Algorithms: Python SDK, ROS1/2, Isaac Sim, LeRobot, etc. Credit to the Seed Studio and thanks for reaching out, Elaine Wu! 📍GitHub: https://lnkd.in/dH4e8Vxp —- Weekly robotics and AI insights. Subscribe free: 22astronauts.com
To view or add a comment, sign in
-
-
C++ and coding skills --> ✅ Robotics fundamentals --> ✅ System architecture --> ✅ But what if your effort doesn't translate to the real world? 🌍 Imagine spending four months developing an underground mining rover. ⛏️ The logic is flawless, the math is precise, and your C++ implementation is highly optimized. But upon deployment, you realize the sensors are positioned such that they cannot gather usable data in that specific environment. 📉 In that moment, regardless of the quality of the code, the robot is effectively useless. 🛑 This highlights why understanding the physical and 3D aspects of robotics is just as critical as the software itself. 🦾 Simulation environments and 3D visualization (Gazebo and RViz2) are the essential bridge between a theoretical algorithm and a functional machine. 🌉 At the heart of this bridge is the URDF (Unified Robot Description Format). URDF is far more than a supporting document; it is the digital blueprint that defines how your software interacts with physical reality. 🏗️ Mastering it allows you to validate sensor transforms, physical constraints, and environmental interactions long before you touch hardware. 🛠️ If you are looking to deepen your understanding of these fundamentals, I’ve attached a guide that covers why the 3D aspect is crucial and how to approach URDF properly. 📖 GitHub Link to URDF Document ---> https://lnkd.in/gBY-sXaD #Robotics #ROS2 #URDF #Engineering #Simulation #Gazebo #CPP #Robotics #RoboticsSoftware #TechInnovation 🤖🚀✨
To view or add a comment, sign in
-
An Fully Open Source Robotics Arm to experiment with ROS 2 reBot-DevArm is a fully open hardware + software stack designed to make embodied AI accessible to more developers. ✔ Complete hardware blueprints (3D parts, sheet metal, full BOM...) ✔ Multiple build options: from kits to fully assembled arm ✔ ROS2, Python SDK, Isaac Sim, LeRobot support ✔ Designed for learning and real-world applications ✔ 6 DOF arm with solid performance (650 mm reach, <0.2 mm repeatability) This is the kind of project that can lower the barrier for anyone wanting to build, learn, or experiment with robotics hands-on. Which Robotics platforms are you using for your ROS 2 projects? Let's connect and share Robotics projects 🔽 #ROS2 #Robotics
To view or add a comment, sign in
-
-
🤖 Robotics: Software vs Hardware — The Perfect Balance Every robot has two sides — one you can touch, and one that thinks. Here’s how they come together: 🧩 Hardware = Body of Robot Motors • Sensors • Arduino • Battery • Wheels 💻 Software = Brain of Robot Python • ROS2 • OpenCV • Code ✨ Key Insight: Hardware moves the robot. Software tells it how to move. Together, they create intelligence in motion. 👉 Which side do you enjoy working on more — hardware or software? #Innovation #SmartMachines #FutureOfWork #Engineering #Robotics #AI #STEM #TechLearning #Automation
To view or add a comment, sign in
-
-
🤖 Sequential vs Parallel Programming — Lessons from a Robotics Competition In a robotics competition, speed isn’t just an advantage… it’s everything. Now imagine two robots on the field 👇 Robot A (Sequential): Moves → stops → processes → acts → repeats Everything happens step by step. Robot B (Parallel): Moves while processing sensor data Adjusts path in real-time Controls multiple components simultaneously Who wins? ⚡ 💥 Parallel programming changes the game in robotics: • Real-time decision making – Sensors, motors, and logic run together • Faster response – No waiting for one task to finish before starting another • Smarter systems – Vision processing + movement + control happening at once • Competitive edge – Milliseconds can decide the winner Think about it: A robot navigating obstacles can’t afford to “finish thinking” before it moves. It has to think, see, and act — all at the same time. That’s parallel programming in action. ⚠️ But here’s where it gets interesting: Parallel systems are harder to design. More threads, more coordination, more chances for things to go wrong. But in a competition setting? 👉 That complexity is often the difference between average and outstanding. 🚀 The takeaway: Sequential programming builds a working robot. Parallel programming builds a winning robot. And in robotics competitions… there’s no prize for finishing second because your code was “simpler.” #Robotics #Programming #ParallelComputing #Engineering #TechInnovation #STEM #RoboticsCompetition
To view or add a comment, sign in
-
-
#100DaysOfLeetcode journey 🚀 Day 58/100 — Optimizing Perpetual Motion! Today’s Problem: 2069. Walking Robot Simulation II 🔹 The Goal: Design a robot that traverses the perimeter of a grid. It moves forward until it hits a wall, then turns 90 degrees counter-clockwise. We need to support millions of steps and instantly return the robot's $(x, y)$ coordinates and direction. 🔹 The Insight: A naive simulation would take $O(\text{steps})$, which fails for large inputs. The key is to realize the robot's path is a Fixed Cycle. By calculating the perimeter length and using the modulo operator, we can reduce any number of steps into a single coordinate on the boundary. 🔹 The Logic: Modulo Striding: I used pos = (pos + num) % loopSize to handle infinite movement in constant time. Perimeter Segmentation: I mapped the 1D "distance traveled" into 2D coordinates by dividing the perimeter into four segments (Bottom, Right, Top, Left). The "Facing" Trap: The trickiest part is the direction. If the robot lands on $(0,0)$ after moving, it’s not facing "East" anymore—it’s facing "South" because it technically hit the boundary and turned before stopping. ✨ Achievement: Day 58! Successfully transformed a simulation problem into a coordinate geometry and modular arithmetic challenge. Crossing the 58% mark by mastering "cycle-based" optimizations is a great feeling. 🔍 Steps followed: ✔ Cycle Length Derivation: Mathematically defined the unique cells on the grid boundary. ✔ Constant-Time Positioning: Implemented $O(1)$ jumps to any future state. ✔ State-Aware Logic: Handled the edge cases of initial vs. post-movement orientation at the origin. 🔧 Complexity Analysis: Time Complexity: $O(1)$ per operation. Space Complexity: $O(1)$. 58 days down! The logic is getting cleaner, and the "Hard" constraints are becoming much more manageable with the right math. 🛠️ #Java #DSA #LeetCode #CodingJourney #100DaysOfCode #SoftwareEngineer #InternshipBound #Programming #Simulation #Geometry #Optimization #Day58
To view or add a comment, sign in
-
-
A 6-DOF robotic arm with open hardware files, ROS 2 support, simulation, Python SDKs, and AI tooling is exactly what more people need to enter robotics. reBot-DevArm is not just a robot arm. It is a full development platform designed for learning embodied AI, manipulation, and real-world deployment without starting from zero. ✅ Open mechanical files, BOM, and build resources ✅ ROS 1 / ROS 2 integration ✅ Python SDK for rapid development ✅ Isaac Sim support for simulation workflows ✅ LeRobot integration for learning-based robotics ✅ 650 mm reach, <0.2 mm repeatability, desktop-scale form factor Paper/Repo: https://lnkd.in/eQPF_Ad6 ⚡ Join a 4600+ Robotics Community - https://lnkd.in/dYxB9iCh ⚡ Subscribe for Weekly Robotics - https://lnkd.in/eVEnffCJ #Robotics #RobotArm #ROS2 #EmbodiedAI #Automation #OpenSource #Engineering #IsaacSim #LeRobot #Python
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