Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

Sunday common C++ interview problem: Shortest path to all keys. Given a map represented as std::vector<std::vector<char>>, where: - # are impassable walls - @ is the entrance to the puzzle - the first k lowercase letters are keys - the corresponding uppercase letters are locked doors Assuming k <= 6, determine the length of the shortest path that collects all keys, -1 if none exists. Solve it yourself: https://lnkd.in/eY6YGU7K Solution: https://lnkd.in/eFhSBGHC #cpp #cplusplus #coding #programming #dailybiteofcpp

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories