Rook Attack Given two strings for the location of two rooks on a chess board, determine if they can attack each other. A standard chessboard is 8x8, with columns labeled A through H (left to right) and rows labeled 1 through 8 (bottom to top). Rooks can move as many squares as they want in a horizontal or vertical direction. So if they are on the same row or column, they can attack each other. freeCodeCamp #DailyCodingChallenge #python #javascript
Can Two Rooks Attack Each Other on a Chessboard
More Relevant Posts
-
🚀 Day 3/30 – Image Puzzle Game using Python 🐍🧩 Day 3 of my 30 Days Python Challenge, and today I built something fun + interactive 🎉 I created an Image Puzzle Game using Python and Tkinter, where users can upload any image, shuffle the tiles, and solve the puzzle by rearranging the pieces 🖼️💻 What I focused on today:✨ Building an interactive GUI using Tkinter✨ Image slicing and tile shuffling logic✨ Creating a smooth and engaging puzzle-solving experience✨ Improving logic building with game mechanics This challenge is helping me stay consistent, creative, and hands-on with real Python projects every day 🚀 👉 Would love your feedback! 👉 What image would you try first in this puzzle game? 👀 Day 4 coming tomorrow… stay tuned 👀 #Python #30DaysChallenge #PythonProjects #Tkinter #PuzzleGame #GUI #CodingJourney #BuildInPublic #GameDevelopment
To view or add a comment, sign in
-
🌟 New Blog Just Published! 🌟 📌 Fast Python Project Setup 2026 with uv, Ruff, Ty, and Polars 🚀 📖 Starting a new Python project used to feel like assembling a jigsaw puzzle before you could write any code. You had to pick an environment manager, a dependency locker, a formatter, a linter, and a...... 🔗 Read more: https://lnkd.in/dZDzhD8G 🚀✨ #uv #ruff #polars
To view or add a comment, sign in
-
🚀 Day 11 of My Python + DSA Journey Today’s problem was all about greedy approach👇 ✅ Jump Game (#55) 💡 Jump Game Check if you can reach the last index 🔍 Approach: Tracked maximum reachable index → if current index exceeds it, return False ⏱ O(n) time | O(1) space 🔥 What I learned today: • Greedy approach can simplify complex problems • Tracking max reach avoids unnecessary checks • Early exit conditions improve efficiency Turning logic into faster decisions ⚡ #Day11 #LeetCode #Python #DSA #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Blender Python Cheatsheet: A Handy Reference for the Blender API It's surprising how knowing a little bit of Python and the Blender API can enable you to do a lot of things. Want to batch process your assets from your library? Want to write a script that automates a part of your workflow? Want to manipulate the node graph using code? Download this free cheat sheet by Salai Vedha Viradhan to get instant solutions for common use cases. https://lnkd.in/eK43cT4t #blender #blender3d #b3d #3d
To view or add a comment, sign in
-
-
FastAPI Depends() — the pattern I learned 7 weeks too late Tutorials show you Depends() in week 1. Nobody shows you composition until your auth is already a mess. The 4-day refactor I could have skipped. Full breakdown (7 min read) → https://lnkd.in/g9F9EWKT #Python #Backend #FastAPI #SoftwareEngineering #WebDev
To view or add a comment, sign in
-
-
I once spent 2 hours debugging a config issue. The token was right. The host was right. Yet nothing worked. Turns out? I had 3 separate config objects running in the same app , each with its own state. That day, I truly understood the Singleton pattern. The idea is simple: one class, one instance, shared everywhere. No duplication. No inconsistency. One single source of truth. It's not magic , it's discipline baked into code. Swipe through the carousel to see how it works, a real-world analogy, and a clean Python implementation. #DesignPatterns #CleanCode #SoftwareEngineering #Python #web
To view or add a comment, sign in
-
The best debugging tool isn't a profiler. It's a walk. 🚶♂️ Staring at the same block of Python code for 3 hours will give you tunnel vision. Stepping away from the keyboard lets your subconscious process the logic flow. I've solved more bugs making a cup of coffee than I have staring at VS Code. #DeveloperLife #Coding #MentalHealth #Python
To view or add a comment, sign in
-
-
🚀 Day 6 of #111DaysOfLearningForChange – Code for Change Built my first CLI-based To-Do App using Python 🧠💻 📌 What I learned today: • File handling using JSON • Structuring a CLI application • Managing state (tasks) with persistent storage • Using match-case for cleaner control flow 🛠️ What I built: A command-line To-Do app with features: • Add tasks • View tasks • Mark tasks as complete ✔️ • Delete tasks • Data stored in a JSON file ✨ Key takeaway: Building projects makes concepts like file handling and control flow much clearer than just theory ⚡ Challenge faced: Handling task IDs and updating data correctly after deletion #111DaysOfLearningForChange #CodeForChange #Python #CLI #Projects #LearningInPublic
To view or add a comment, sign in
-
More from this author
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
PhD Física Teórica
3wI would ask if str_rook1(i)=str_rook2(i), for i=1,2