dsa and algorithm - Copy