Skip to content

Commit

Permalink
Added solution for Leetcode 0056. Merge Intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdavid-bp committed Jul 10, 2024
1 parent f3317f5 commit c0e9045
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import java.util.Arrays;
import java.util.LinkedList;

public class Solution {
public class OptimizedSortingApproachUsingLinkedList {
public static void main(String[] args) {
int[][] intervals = {{1,3},{2,6},{8,10},{15,18}};
Arrays.sort(intervals, (a, b) -> Integer.compare(a[0], b[0]));
Expand Down

0 comments on commit c0e9045

Please sign in to comment.