title: Combine to get smallest num that larger than a target
body: <p>I encountered a algorithm problem:</p>
  <p>Given an array <strong>arr</strong>(just include some single digit num) and a integer <strong>K</strong> (you can assume int type in java), combine the number in the array to get a smallest integer that larger than <strong>K</strong>.
  (Combine means like you can regard every element in arr as a string, and concatenate them. for example: I use four &quot;1&quot;s to get &quot;1&quot; + &quot;1&quot; +&quot;1&quot;+&quot;1&quot; = &quot;1111&quot;)</p>
  <p>Example:</p>
  <p>arr: [1,2,3,4] target:123 , output: 124</p>
  <p>arr: [1,2,3,4] target:999 , output: 1111</p>
  <p>arr: [9] target:23 , output: 99</p>
  <p>I can just came up with a brute force way, using backtracking to find all possible combination first and loop thru the all candidates to find the result.</p>
  <p>Any optimization here?</p>