Challenge Information

Title : Missing Element
Difficulty : Easy
Solutions : 7
Maximum Score : 50
Completed by You: No
Description :

You are given an array of size n-1, it contains only distinct integers in the range of 1 to n, from which you have to find the element which is missing.

Write a function solve that have the following parameter(s):
1.) arr = array of integers

Example
Input:
arr = [1, 2, 4, 6, 3, 7, 8, 10, 9]
Output:
The function will return,
5

Explanation In first array, numbers from 1 - n the missing element is "5".

Input:
arr = [1, 5, 8, 3, 9, 2, 4, 6, 10]
Output:
The function will return,
7

Explanation
In second array, numbers from 1 - n the missing element is "7".

Constraints

Judocode