Bloomberg Interview Questions/Q 3

From Software Engineers Wiki
Jump to: navigation, search

Given an array A [0, 1, 3, 4, 9, 5, 7, 6, 2] and number N. This means that the array consists of the numbers from 0 ... N. However, as you see, 8 is missing in A. Print the missing number. Think about the case N = 10^6.

Answer

Please refer to Find a Missing Number

Reference

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox