Selecting an adjacent vertex with maximum z value
I have a surface with a number of vertices.
I want to draw a spline from one vertex to the next adjacent vertex having the maximum z value and then continue drawing the spline until there are no adjacent vertices having a larger z value.
I can't find an expression that would allow me to select this maximum z value vertex.
Any help appreciated.