Skip to content

Commit c6407ef

Browse files
author
Antesh Sharma
committed
merge two sorted array and find median
1 parent 8721070 commit c6407ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/antesh/problems/MergeTwoSortedArraysAndFindMedianProblem.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ public static void main(String[] args) {
2626

2727
System.out.println("Median is " + mergeTwoSortedArrayAndFindMedian(arr3, 0, arr4, 0));
2828

29+
int[] arr5 = {1, 12, 15, 26};
30+
int[] arr6 = {2, 12, 17, 30, 45};
31+
32+
System.out.println("Median is " + mergeTwoSortedArrayAndFindMedian(arr5, 0, arr6, 0));
33+
34+
2935
//If we already have sorted array and need to find median
3036
System.out.println(findMedian(new int[]{1, 2, 12, 13, 15, 24, 26, 38}));
3137
}

0 commit comments

Comments
 (0)