I have list of edges in 3D as following ((x1, y1, z1), (x2,y2,z2)) ..... ((x_k, y_k, z_k), (x_t, y_t, z_t))
From them, I need obtain list of vertex.
My current idea: Create initial emty set V
Check all edges, check coordinate of 2 points, if it is not in set V, add it to V.
I feel it is not fast when checking one by one whether 3D coordinate exist in set or not.
I need a cleaner and faster method? Any suggestion?