2
public boolean mergeTriplets(int[][] triplets, int[] target) {4
boolean xFound = false, yFound = false, zFound = false;6
for (int[] triplet : triplets) {8
// Current Triplet is target9
if (triplet[0] == target[0] && triplet[1] == target[1] && triplet[2] == target[2])12
if (triplet[0] == target[0]) {13
if (triplet[1] <= target[1] && triplet[2] <= target[2])14
if (yFound && zFound) return true;17
if (triplet[1] == target[1]) {18
if (triplet[0] <= target[0] && triplet[2] <= target[2])19
if (xFound && zFound) return true;22
if (triplet[2] == target[2]) {23
if (triplet[1] <= target[1] && triplet[0] <= target[0])24
if (yFound && xFound) return true;28
return xFound && yFound && zFound;