For Question 3 in Contest 290, I got my code right in test cases, but leetcode platform displays Time Limit Exceeded. @admin Please help me check if it's qualified for scores back, thanks!
public static int[] countRectangles_1(int[][] rectangles, int[][] points) {
int[] count = new int[points.length];
for (int i = 0; i < points.length; i++) {
int x = points[i][0];
int y = points[i][1];
int temp = 0;
for (int j = 0; j < rectangles.length; j++) {
int l = rectangles[j][0];
int h = rectangles[j][1];
if (x <= l && y <= h) {
temp++;
}
}
count[i] = temp;
}
return count;
}