1. Installation environment:
    Xcode 13.0

  2. Directory

  • Project

  • Executable swift file

  1. How to run

cd ./CronJobScheduler
cat input.txt | swift main.swift 16:10


The task can be run from terminal using the above instruction. All the codes reside in main.swift file.
If I had the time, I would do the following things:-

  • Create mock data and test each of the individual methodsof classes/structs(ie. InputValidator, InputParser, SimulatedTimeParser, OutputFormatter etc.).
  • Add more comments on each core logics to help reviewer understand the code more easily.
  • Add more validation and error safety for edge cases or invalid input patterns.


View Github