coding skyline algorithm 1