← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given an integer n (1 ≤ n ≤ 99) and a digit string s. The string was formed by concatenating the decimal representations of every integer from 1 to n in order, except that exactly one number was omitted during the concatenation. Your task is to determine and return the missing number. If the string cannot be obtained by missing exactly one number from the sequence 1..n, return -1.