1. 5
  1.  

  2. 2

    Notice how the actual problem provides a list of three-digit numbers. Using two-digit numbers was a simplification that I had made to help me think about the problem initially. Three-digit numbers do not fundamentally change the problem, it just provides more data per number. Now instead of only knowing that digit a comes before digit b, I also know that digit a comes before c, and b before c.

    Three digit numbers do fundamentally change the problem. Consider the 3-digit string 223. If you break it into pairs, you get 22, 23, 23, which admits invalid solution 232. The author already notes that duplicate numbers breaks his specific solution; this is just another way it breaks that.

    1. 2

      Great article but why do I get these questions when interviewing for a front-end developer job?