Given 2 sorted arrays Ar1 and Ar2 of size N each. Merge the given arrays and find the sum of the two middle elements of the merged array.

Input:
N = 5
Ar1[] = {1, 2, 4, 6, 10}
Ar2[] = {4, 5, 6, 9, 12}
Output: 11
Explanation: The merged array looks like
{1,2,4,4,5,6,6,9,10,12}. Sum of middle
elements is 11 (5 + 6).

--

--

--

iOS Developer, Triple graduated, Passionate, Love workout, blogger

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Types of QA Tests

Building and Managing High Performing Team

How to Delete a Pivot Table in Google Sheets and Excel: 1-Minute Ultimate Beginner’s Guide

External Code (Gems & Libraries)

sudo make Raspberry Pi a Kiosk

Java 17: What’s New?

Customer Q&A: How Craighead Electric Cooperative Corporation deployed their fiber network 55%…

ICYMI: five updates you’ve missed about Serverless Step Functions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mr.Javed Multani

Mr.Javed Multani

iOS Developer, Triple graduated, Passionate, Love workout, blogger

More from Medium

Should you start with Kotlin as a beginner coder?

What are Coursera and its feature?

IBM Code Knack — GBS Campus Hiring: Batch 2022 — Associate Developer (Easy)

What is Kotlin and Why you should use it?