Microsoft Interview Question

insert 5 in a given integer number by resulting with the largest possible number.

Interview Answers

Anonymous

Aug 9, 2021

if positive insert before the first number smaller than 5 if negative insert before the first number bigger than 5

Anonymous

Jun 23, 2021

insert 5 before the first smaller than five digit.

2