Smallest number constructed by odd digits

Asked at Meta · Coding Questions · Difficulty: Easy

Given a positive integer, construct the smallest number using only the odd digits from it, and return that number. The input is guaranteed to have at least one odd digit.

Loading the problem…