Algorithm Experiment Code Written By Swift