I have this array:
[[4, 50], [2, 28], [1, 4], [4, 41], [1, 9], [2, 25]]
I wish to construct an array consisting of those tuples [f,l] of this array such that there is no tuple [g,h] preceding [f,l] for which g==f. The selected tuples are to be in the same order as in the original array.
[[4, 50], [2, 28], [1, 4]]
Example if there are any more arrays that begin with 4 or 1 it should be deleted. It could be any integer, 4 and 1 is only an example.
[2, 25]deleted?"I want the result to be:": "I wish to construct an array consisting of those tuples[f,l]of this array such that there is no tuple[g,h]preceding[f,l]for whichg==f. The selected tuples are to be in the same order as in the original array." Yes, that's a bit of a mouthful, but I think it states unambiguously what you are trying to accomplish.