Algorithm Experiment code writter by Swift