Comment Comment by kgabis I loop twice, so complexity is O(2N). Actually, it's still O(N). parent kgabis 13 years ago