[quote user="sagar"]How to find that the linestrings are open i.e. not properly snapped[/quote]
You must define a tolerance that is the maximum distance between two points that you want to consider coincident. Then use something like mdlVec_equalTolerance to determine whether two points are considered equal.