🏁 RelayRacers
Inspiration
We were inspired by the thrill of competitive relay races and the challenge of solving optimization problems in real-time. The idea was to bring racing dynamics into a data structures and algorithms (DSA) problem while building a clean, modular C++ project.
What it does
RelayRacers simulates a relay race where racers pass the baton under given constraints. It computes the minimum number of racers required to finish the race optimally, ensuring efficiency even with large test cases.
How we built it
- Language: C++17
- Build System: CMake for portability and easy builds
- Structure:
include/→ header filessrc/→ core implementation (main.cpp,racers.cpp)tests/→ sample unit tests for validation
- Algorithms: Greedy + Binary Search optimization for efficient performance.
Challenges we ran into
- Initial brute-force solutions timed out on large inputs.
- Designing a modular project structure that was both scalable and beginner-friendly.
- Debugging edge cases where racer overlap wasn’t straightforward.
Accomplishments that we're proud of
- Optimized the solution to handle large inputs efficiently.
- Clean and modular C++ project layout that’s easy to extend.
- Passing all sample and stress test cases.
What we learned
- How to turn a DSA problem into a full-fledged project.
- The importance of algorithmic optimization (greedy + binary search).
- Best practices in C++ project structuring with CMake.
What's next for RelayRacers
- Add a visualization layer to see the relay race in action.
- Expand test cases with randomized stress testing.
- Build a web-based playground where users can input their own race data.
Log in or sign up for Devpost to join the conversation.