The computer has four slots, and each slot will contain a ball that is red, yellow, green or blue. You can take a guess what combination it is. For each color that fits the slot, you get a hit and if you have a color that is in wrong position, but exists, you get a pseudo hit. Given a request and solution, output hits and pseudo hits.
O(n)
O(n)
Run make to build and run C++ files and run Swift files. Or you can run .playground file.