From 90f73b22e7d8498967a475b14ea0adb8b4ee0f14 Mon Sep 17 00:00:00 2001 From: Dhaval Pandey <68287498+dhavalpandey@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:47:06 +0000 Subject: [PATCH] Create SolutionByDhaval.py --- .../Median of Two Sorted Array/SolutionByDhaval.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Divide and Conquer/Median of Two Sorted Array/SolutionByDhaval.py diff --git a/Divide and Conquer/Median of Two Sorted Array/SolutionByDhaval.py b/Divide and Conquer/Median of Two Sorted Array/SolutionByDhaval.py new file mode 100644 index 000000000..9dc30ec0e --- /dev/null +++ b/Divide and Conquer/Median of Two Sorted Array/SolutionByDhaval.py @@ -0,0 +1,11 @@ +import statistics + +len1 = int(input()) +arr1 = list(map(int, input().split(" "))) +len2 = int(input()) +arr2 = list(map(int, input().split(" "))) + +arr = arr1 + arr2 +arr.sort() + +print(statistics.median(arr))