New Introducing AI Readiness Pulse Survey - Evaluate your team's AI literacy AI Readiness Pulse Survey
Learn More View
Explore All Products
Experience Xobin – Book Your 30-Minute Personalized Demo
Book a Demo
Experience Xobin – Book Your 30-Minute Personalized Demo
Book a Demo
New AI Readiness Pulse Survey
View

Experience Xobin - Book Your 30-Minute Personalized Demo

Book a Demo

Problem Statement :

You are given two sorted arrays arr1 and arr2 of size n and m respectively, and return the median of the two sorted arrays.
The function median_array() accepts the parameters array of integer arr1 and arr2 and their respective sizes n and m. Complete the function median_array() and return the median_value in double format with 2 decimal places.
For Example: The arr1 is [1,4,7,10,12] and arr2 is [2,3,6,15]. Then the median of an array is 6.00

Testcase 1

Input: n=1 m=1 arr1=[1] arr2=[2]

Output: 1.50

Testcase 2

Input: n=2 m=1 arr1=[1,3] arr2=[2]

Output: 2.00

Problem Statement :

An ‘n’ inch cube is painted on all its faces. It is being cut into small cubes of each one inch size.
Huma Khan is given the task of finding the number of cubes with ‘m’ faces painted after cutting the large cube.
Write a program to help Huma Khan, to find out the number of cubes given the m value.

Testcase 1

Input: 5 3

Output: 8

Testcase 2

Input: 8 1

Output: 216

Fill up the form to continue :

Powered by