Skip to content

Improved task 3464 #1924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package g3401_3500.s3464_maximize_the_distance_between_points_on_a_square;

// #Hard #Array #Greedy #Binary_Search #2025_02_25_Time_18_ms_(98.51%)_Space_49.78_MB_(46.27%)
// #Hard #Array #Greedy #Binary_Search #2025_02_27_Time_17_ms_(98.18%)_Space_50.10_MB_(41.82%)

import java.util.Arrays;

public class Solution {
public int maxDistance(int side, int[][] pts, int k) {
int n = pts.length;
public int maxDistance(int side, int[][] points, int k) {
int n = points.length;
long[] p = new long[n];
for (int i = 0; i < n; i++) {
int x = pts[i][0];
int y = pts[i][1];
int x = points[i][0];
int y = points[i][1];
long c;
if (y == 0) {
c = x;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Write your MySQL query statement below
# #Easy #Database #2025_02_25_Time_716_ms_(100.00%)_Space_0.0_MB_(100.00%)
# #Easy #Database #2025_02_26_Time_292_ms_(90.91%)_Space_0.0_MB_(100.00%)
SELECT * FROM products WHERE description REGEXP 'SN[0-9]{4}-[0-9]{4}$'
OR description REGEXP 'SN[0-9]{4}-[0-9]{4}[^0-9]+' ORDER BY product_id